mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
input: touchscreen: nt36xxx: Avoid i2c transfer in LA during TUI
Switching between two TUI layouts, involves TUI current session abort and start of new TUI session with next layout. In between two layout transition, if display is touched and next TUI session is started parallely. Ownership of register space is transferred to Trusted VM leading to crash during i2c transfer in LA. This change avoid i2c transfer in LA when TUI session is started. Change-Id: I2f561fd43d3705c18f83556baac8166ede901605 Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
This commit is contained in:
parent
bae21357e6
commit
172ca98496
1 changed files with 9 additions and 1 deletions
|
|
@ -2041,6 +2041,14 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||
|
||||
mutex_lock(&ts->lock);
|
||||
|
||||
#ifdef CONFIG_NOVATEK_TRUSTED_TOUCH
|
||||
#ifndef CONFIG_ARCH_QTI_VM
|
||||
if (nvt_ts_trusted_touch_get_pvm_driver_state(ts) !=
|
||||
TRUSTED_TOUCH_PVM_INIT)
|
||||
return IRQ_HANDLED;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ret = CTP_I2C_READ(ts->client, I2C_FW_Address, point_data, POINT_DATA_LEN + 1);
|
||||
if (ret < 0) {
|
||||
NVT_ERR("CTP_I2C_READ failed.(%d)\n", ret);
|
||||
|
|
@ -3123,7 +3131,7 @@ static int32_t nvt_ts_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ST_TRUSTED_TOUCH
|
||||
#ifdef CONFIG_NOVATEK_TRUSTED_TOUCH
|
||||
if (atomic_read(&ts->trusted_touch_enabled))
|
||||
wait_for_completion_interruptible(
|
||||
&ts->trusted_touch_powerdown);
|
||||
|
|
|
|||
Loading…
Reference in a new issue