*/
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,
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)
} while (ts->event_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)
enable_irq(ts->irq);
tsc2301_ts_start_scan(tsc);
- /* Same workaround as above. */
- tsc2301_kp_restart(tsc);
}
#ifdef CONFIG_PM