mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
input: touchscreen: nt36xxx: Use disable/enable irq wake in LA to LE
Touch uses gpio as irq in LA. As per latest change from pinctrl, wakeup bit is disabled/enabled when disable_irq/enable_irq is called. During transtion from LA to LE, disable_irq is called leading to wakeup bit getting disabled and in LE Touch interrupts does not come. So, use disable_irq_wake to disable Touch interrupts while transition from LA to LE and use enable_irq_wake to enable back Touch interrupts while transition from LE to LA. Change-Id: Iad3391af40535d51daeef881c3d62b3ec893fff2 Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
This commit is contained in:
parent
6753ae03b3
commit
e44ea45369
2 changed files with 15 additions and 0 deletions
|
|
@ -725,6 +725,7 @@ static void nvt_ts_trusted_touch_abort_pvm(struct nvt_ts_data *ts)
|
|||
case TRUSTED_TOUCH_PVM_INIT:
|
||||
case PVM_I2C_RESOURCE_RELEASED:
|
||||
atomic_set(&ts->trusted_touch_enabled, 0);
|
||||
atomic_set(&ts->trusted_touch_underway, 0);
|
||||
}
|
||||
|
||||
atomic_set(&ts->trusted_touch_abort_status, 0);
|
||||
|
|
@ -835,6 +836,7 @@ static void nvt_trusted_touch_pvm_vm_mode_disable(struct nvt_ts_data *ts)
|
|||
nvt_ts_trusted_touch_set_pvm_driver_state(ts,
|
||||
TRUSTED_TOUCH_PVM_INIT);
|
||||
atomic_set(&ts->trusted_touch_enabled, 0);
|
||||
atomic_set(&ts->trusted_touch_underway, 0);
|
||||
pr_info("trusted touch disabled\n");
|
||||
return;
|
||||
error:
|
||||
|
|
@ -973,6 +975,7 @@ static int nvt_ts_trusted_touch_pvm_vm_mode_enable(struct nvt_ts_data *ts)
|
|||
int rc = 0;
|
||||
struct trusted_touch_vm_info *vm_info = ts->vm_info;
|
||||
|
||||
atomic_set(&ts->trusted_touch_underway, 1);
|
||||
/* i2c session start and resource acquire */
|
||||
if (nvt_ts_bus_get(ts) < 0) {
|
||||
pr_err("nvt_ts_bus_get failed\n");
|
||||
|
|
@ -1208,12 +1211,23 @@ static void nvt_irq_enable(bool enable)
|
|||
|
||||
if (enable) {
|
||||
if (!ts->irq_enabled) {
|
||||
#ifdef CONFIG_NOVATEK_TRUSTED_TOUCH
|
||||
/* trusted_touch_underway is set in LA only */
|
||||
if (atomic_read(&ts->trusted_touch_underway))
|
||||
enable_irq_wake(ts->client->irq);
|
||||
#else
|
||||
enable_irq(ts->client->irq);
|
||||
#endif
|
||||
ts->irq_enabled = true;
|
||||
}
|
||||
} else {
|
||||
if (ts->irq_enabled) {
|
||||
#ifdef CONFIG_NOVATEK_TRUSTED_TOUCH
|
||||
if (atomic_read(&ts->trusted_touch_underway))
|
||||
disable_irq_wake(ts->client->irq);
|
||||
#else
|
||||
disable_irq(ts->client->irq);
|
||||
#endif
|
||||
ts->irq_enabled = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ struct nvt_ts_data {
|
|||
struct clk *iface_clk;
|
||||
atomic_t trusted_touch_initialized;
|
||||
atomic_t trusted_touch_enabled;
|
||||
atomic_t trusted_touch_underway;
|
||||
atomic_t trusted_touch_event;
|
||||
atomic_t trusted_touch_abort_status;
|
||||
atomic_t delayed_vm_probe_pending;
|
||||
|
|
|
|||
Loading…
Reference in a new issue