diff options
author | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-06-01 18:31:29 +0200 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-06-01 18:31:29 +0200 |
commit | 6258fbb5686dc778fe16489fdb9896b0e065613b (patch) | |
tree | d5e7fb69dfa529782320ce7075ddab49b98caf80 /drivers/input | |
parent | af51b9fefd7eaedb4c1df339778cacfea18bb650 (diff) |
ccwmx51: Touchscreen through PMIC issues
When the touchscreen is touched the mxc_ts kernel thread uses around
30% of the CPU power continuously even is the touchscreen is no longer
used. Also, once the thread is running, the reset button no longer resets
the board.
This fixes both issues.
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/mxc_ts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/mxc_ts.c b/drivers/input/touchscreen/mxc_ts.c index 02b34aceac47..610f31e65778 100644 --- a/drivers/input/touchscreen/mxc_ts.c +++ b/drivers/input/touchscreen/mxc_ts.c @@ -70,13 +70,17 @@ static int ts_thread(void *arg) static int last_x = -1, last_y = -1, last_press = -1; memset(&ts_sample, 0, sizeof(t_touch_screen)); - + /* After 2 consecutive samples with the pen up, enable irq waiting */ if (0 != pmic_adc_get_touch_sample(&ts_sample, !(wait + wait2))) { + msleep(20); continue; } if (!(ts_sample.contact_resistance || wait)) + { + msleep(20); continue; + } if (ts_sample.x_position == 0 && ts_sample.y_position == 0 && ts_sample.contact_resistance == 0) { |