-vis On S3c2410x Delta Driver - Online

// Request GPIO ret = gpio_request(delta_data_pin, "delta_data"); if (ret) return ret; s3c_gpio_cfgpin(delta_data_pin, S3C_GPIO_SFN(0x0)); // Input s3c_gpio_setpull(delta_data_pin, S3C_GPIO_PULL_UP);

static long vis_delta_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) struct vis_delta_device *vis = filp->private_data; switch(cmd) case VIS_SET_BRIGHTNESS: // Map Delta-sigma value to LCD PWM writel(arg, vis->reg_base + S3C2410_LCDCON5); break; case VIS_GET_TOUCH_RAW: copy_to_user((void __user *)arg, vis->delta_sigma_samples, sizeof(vis->delta_sigma_samples)); break; -vis On S3c2410x Delta Driver -

// Request IRQ (trigger on rising clock edge) ret = request_irq(delta_irq, delta_irq_handler, IRQF_TRIGGER_RISING, "vis_delta", NULL); if (ret) goto err_irq; // Request GPIO ret = gpio_request(delta_data_pin

static irqreturn_t vis_delta_isr(int irq, void *dev_id) struct vis_delta_device *vis = dev_id; static int bit_count = 0; static u32 accum = 0; int data_bit = gpio_get_value(DELTA_DATA_PIN); if (ret) return ret

A custom ioctl call is implemented:

#include <linux/module.h> #include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/gpio.h> #include <mach/regs-lcd.h> #include <plat/gpio-cfg.h> #define DRIVER_NAME "vis_delta"

When the user touches the Delta touch panel (differential measurement), the driver computes the X/Y coordinates. It then uses the S3C2410_LCDCON registers to dynamically adjust the TIMEVAL (vertical sync) or the MVAL (inversion signal) to reduce flicker.