The following steps could provoke the HW problem: cd /sys/devices/platform/omap2_mcspi.1/spi1.0 echo 1 > disable_kp echo 0 > disable_kp echo 1 > disable_ts Signed-off-by: Klaus Pedersen <klaus.k.pedersen@xxxxxxxxx> --- drivers/input/keyboard/tsc2301_kp.c | 13 ++++--------- drivers/input/touchscreen/tsc2301_ts.c | 8 ++------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/input/keyboard/tsc2301_kp.c b/drivers/input/keyboard/tsc2301_kp.c index 018757b..8f1cf15 100644 --- a/drivers/input/keyboard/tsc2301_kp.c +++ b/drivers/input/keyboard/tsc2301_kp.c @@ -58,8 +58,8 @@ struct tsc2301_kp { struct mutex mutex; struct timer_list timer; u16 keys_pressed; - unsigned pending:1; - unsigned user_disabled:1; + u8 pending; + u8 user_disabled; unsigned disable_depth; struct spi_transfer read_xfer[4]; @@ -270,14 +270,9 @@ out: */ void tsc2301_kp_restart(struct tsc2301 *tsc) { - struct tsc2301_kp *kp = tsc->kp; - - mutex_lock(&kp->mutex); - if (!kp->user_disabled) { - tsc2301_kp_disable(tsc, 0); - tsc2301_kp_enable(tsc); + if (!tsc2301_kp_disabled(tsc)) { + tsc2301_kp_start_scan(tsc); } - mutex_unlock(&kp->mutex); } static ssize_t tsc2301_kp_disable_show(struct device *dev, diff --git a/drivers/input/touchscreen/tsc2301_ts.c b/drivers/input/touchscreen/tsc2301_ts.c index 58fab66..474577a 100644 --- a/drivers/input/touchscreen/tsc2301_ts.c +++ b/drivers/input/touchscreen/tsc2301_ts.c @@ -265,11 +265,13 @@ static int tsc2301_ts_configure(struct tsc2301 *tsc, int flags) static void tsc2301_ts_start_scan(struct tsc2301 *tsc) { tsc2301_ts_configure(tsc, tsc->ts->hw_flags); + tsc2301_kp_restart(tsc); } static void tsc2301_ts_stop_scan(struct tsc2301 *tsc) { tsc2301_write_reg(tsc, TSC2301_REG_ADC, TSC2301_ADCREG_STOP_CONVERSION); + tsc2301_kp_restart(tsc); } static void update_pen_state(struct tsc2301_ts *ts, int x, int y, int pressure) @@ -422,10 +424,6 @@ static void tsc2301_ts_disable(struct tsc2301 *tsc) } while (ts->sample_sent); tsc2301_ts_stop_scan(tsc); - /* Workaround a bug where turning on / off touchscreen scanner - * can get the keypad scanner stuck. - */ - tsc2301_kp_restart(tsc); } static void tsc2301_ts_enable(struct tsc2301 *tsc) @@ -438,8 +436,6 @@ static void tsc2301_ts_enable(struct tsc2301 *tsc) enable_irq(ts->irq); tsc2301_ts_start_scan(tsc); - /* Same workaround as above. */ - tsc2301_kp_restart(tsc); } #ifdef CONFIG_PM -- 1.5.3.3 - To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html