summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/mxc_ts.c
diff options
context:
space:
mode:
authorTodd Doucet <todd.doucet@timesys.com>2010-02-18 12:38:44 -0500
committerTodd Doucet <todd.doucet@timesys.com>2010-02-18 12:38:44 -0500
commit793deae7244b1c3d3dc9ad9437b692655e04d1c1 (patch)
treeb49aa81dd8bdc377dc64aee55c0ebca1e522b34e /drivers/input/touchscreen/mxc_ts.c
parent7e407c346b8c197f73e88aea4c6ca3de19710aa1 (diff)
Intermediate alpha release with partially working touchscreen for special customer.2.6.28-ccwmx51js-201002181258
Diffstat (limited to 'drivers/input/touchscreen/mxc_ts.c')
-rw-r--r--drivers/input/touchscreen/mxc_ts.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/mxc_ts.c b/drivers/input/touchscreen/mxc_ts.c
index b354d81c5465..2b57a26804b6 100644
--- a/drivers/input/touchscreen/mxc_ts.c
+++ b/drivers/input/touchscreen/mxc_ts.c
@@ -43,6 +43,7 @@ static u32 input_ts_installed;
static int ts_thread(void *arg)
{
+ int j1=0, j2=0, j3=0, j4=0;
t_touch_screen ts_sample;
s32 wait = 0;
@@ -50,19 +51,36 @@ static int ts_thread(void *arg)
while (input_ts_installed) {
try_to_freeze();
memset(&ts_sample, 0, sizeof(t_touch_screen));
- if (0 != pmic_adc_get_touch_sample(&ts_sample, !wait))
- continue;
- if (!(ts_sample.contact_resistance || wait))
+ j3 = jiffies;
+ if (0 != pmic_adc_get_touch_sample(&ts_sample, !wait)){
+ printk("ttd: pmic_adc_get_touch_sample() RETURNS NONZERO\n");
continue;
+ }
+ j4 = jiffies;
+// printk("ts_thread: pmic_adc_get_touch_sample() took %d jiffies\n", j4 - j3);
+ if (!(ts_sample.contact_resistance || wait)){
+ printk("ttd: continue: res=%d, wait=%d\n", ts_sample.contact_resistance, wait);
+ continue;
+ }
+
+ printk("ttd: ts_thread sending event: abs x=%d, abx y = %d, resistance = %d\n",
+ ts_sample.x_position,
+ ts_sample.y_position,
+ ts_sample.contact_resistance
+ );
+ j1 = jiffies;
input_report_abs(mxc_inputdev, ABS_X, ts_sample.x_position);
input_report_abs(mxc_inputdev, ABS_Y, ts_sample.y_position);
input_report_abs(mxc_inputdev, ABS_PRESSURE,
ts_sample.contact_resistance);
input_sync(mxc_inputdev);
+ j2 = jiffies;
wait = ts_sample.contact_resistance;
+ j1 = jiffies;
msleep(20);
+ j2 = jiffies;
}
return 0;