Loading drivers/input/touchscreen/st/fts.c +11 −4 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ static void fts_interrupt_disable(struct fts_ts_info *info); static void fts_interrupt_enable(struct fts_ts_info *info); static irqreturn_t fts_interrupt_handler(int irq, void *handle); static int fts_probe_delayed(struct fts_ts_info *info); static int fts_enable_reg(struct fts_ts_info *info, bool enable); #ifdef CONFIG_ST_TRUSTED_TOUCH Loading Loading @@ -765,7 +766,6 @@ static void fts_trusted_touch_abort_pvm(struct fts_ts_info *info) case PVM_I2C_RESOURCE_ACQUIRED: case PVM_INTERRUPT_ENABLED: fts_bus_put(info); complete(&info->trusted_touch_powerdown); case TRUSTED_TOUCH_PVM_INIT: case PVM_I2C_RESOURCE_RELEASED: atomic_set(&info->trusted_touch_enabled, 0); Loading Loading @@ -807,6 +807,9 @@ static int fts_bus_get(struct fts_ts_info *info) { int rc = 0; flush_workqueue(info->event_wq); reinit_completion(&info->trusted_touch_powerdown); fts_enable_reg(info, true); mutex_lock(&info->fts_clk_io_ctrl_mutex); rc = pm_runtime_get_sync(info->client->adapter->dev.parent); if (rc >= 0 && info->core_clk != NULL && info->iface_clk != NULL) { Loading @@ -825,6 +828,8 @@ static void fts_bus_put(struct fts_ts_info *info) fts_clk_disable_unprepare(info); pm_runtime_put_sync(info->client->adapter->dev.parent); mutex_unlock(&info->fts_clk_io_ctrl_mutex); complete(&info->trusted_touch_powerdown); fts_enable_reg(info, false); } static struct hh_notify_vmid_desc *fts_vm_get_vmid(hh_vmid_t vmid) Loading Loading @@ -876,7 +881,6 @@ static void fts_trusted_touch_pvm_vm_mode_disable(struct fts_ts_info *info) fts_bus_put(info); fts_trusted_touch_set_pvm_driver_state(info, PVM_I2C_RESOURCE_RELEASED); complete(&info->trusted_touch_powerdown); fts_trusted_touch_set_pvm_driver_state(info, TRUSTED_TOUCH_PVM_INIT); atomic_set(&info->trusted_touch_enabled, 0); Loading Loading @@ -1051,7 +1055,6 @@ static int fts_trusted_touch_pvm_vm_mode_enable(struct fts_ts_info *info) } fts_trusted_touch_set_pvm_driver_state(info, PVM_IRQ_LENT_NOTIFIED); reinit_completion(&info->trusted_touch_powerdown); atomic_set(&info->trusted_touch_enabled, 1); pr_debug("trusted touch enabled\n"); return rc; Loading Loading @@ -1381,7 +1384,6 @@ static int fts_init_afterProbe(struct fts_ts_info *info); static int fts_mode_handler(struct fts_ts_info *info, int force); static int fts_command(struct fts_ts_info *info, unsigned char cmd); static int fts_chip_initialization(struct fts_ts_info *info); static int fts_enable_reg(struct fts_ts_info *info, bool enable); static struct drm_panel *active_panel; Loading Loading @@ -5347,6 +5349,11 @@ static void fts_resume_work(struct work_struct *work) info = container_of(work, struct fts_ts_info, resume_work); #ifdef CONFIG_ST_TRUSTED_TOUCH if (atomic_read(&info->trusted_touch_enabled)) wait_for_completion_interruptible( &info->trusted_touch_powerdown); #endif __pm_wakeup_event(info->wakeup_source, HZ); fts_chip_power_switch(info, true); Loading Loading
drivers/input/touchscreen/st/fts.c +11 −4 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ static void fts_interrupt_disable(struct fts_ts_info *info); static void fts_interrupt_enable(struct fts_ts_info *info); static irqreturn_t fts_interrupt_handler(int irq, void *handle); static int fts_probe_delayed(struct fts_ts_info *info); static int fts_enable_reg(struct fts_ts_info *info, bool enable); #ifdef CONFIG_ST_TRUSTED_TOUCH Loading Loading @@ -765,7 +766,6 @@ static void fts_trusted_touch_abort_pvm(struct fts_ts_info *info) case PVM_I2C_RESOURCE_ACQUIRED: case PVM_INTERRUPT_ENABLED: fts_bus_put(info); complete(&info->trusted_touch_powerdown); case TRUSTED_TOUCH_PVM_INIT: case PVM_I2C_RESOURCE_RELEASED: atomic_set(&info->trusted_touch_enabled, 0); Loading Loading @@ -807,6 +807,9 @@ static int fts_bus_get(struct fts_ts_info *info) { int rc = 0; flush_workqueue(info->event_wq); reinit_completion(&info->trusted_touch_powerdown); fts_enable_reg(info, true); mutex_lock(&info->fts_clk_io_ctrl_mutex); rc = pm_runtime_get_sync(info->client->adapter->dev.parent); if (rc >= 0 && info->core_clk != NULL && info->iface_clk != NULL) { Loading @@ -825,6 +828,8 @@ static void fts_bus_put(struct fts_ts_info *info) fts_clk_disable_unprepare(info); pm_runtime_put_sync(info->client->adapter->dev.parent); mutex_unlock(&info->fts_clk_io_ctrl_mutex); complete(&info->trusted_touch_powerdown); fts_enable_reg(info, false); } static struct hh_notify_vmid_desc *fts_vm_get_vmid(hh_vmid_t vmid) Loading Loading @@ -876,7 +881,6 @@ static void fts_trusted_touch_pvm_vm_mode_disable(struct fts_ts_info *info) fts_bus_put(info); fts_trusted_touch_set_pvm_driver_state(info, PVM_I2C_RESOURCE_RELEASED); complete(&info->trusted_touch_powerdown); fts_trusted_touch_set_pvm_driver_state(info, TRUSTED_TOUCH_PVM_INIT); atomic_set(&info->trusted_touch_enabled, 0); Loading Loading @@ -1051,7 +1055,6 @@ static int fts_trusted_touch_pvm_vm_mode_enable(struct fts_ts_info *info) } fts_trusted_touch_set_pvm_driver_state(info, PVM_IRQ_LENT_NOTIFIED); reinit_completion(&info->trusted_touch_powerdown); atomic_set(&info->trusted_touch_enabled, 1); pr_debug("trusted touch enabled\n"); return rc; Loading Loading @@ -1381,7 +1384,6 @@ static int fts_init_afterProbe(struct fts_ts_info *info); static int fts_mode_handler(struct fts_ts_info *info, int force); static int fts_command(struct fts_ts_info *info, unsigned char cmd); static int fts_chip_initialization(struct fts_ts_info *info); static int fts_enable_reg(struct fts_ts_info *info, bool enable); static struct drm_panel *active_panel; Loading Loading @@ -5347,6 +5349,11 @@ static void fts_resume_work(struct work_struct *work) info = container_of(work, struct fts_ts_info, resume_work); #ifdef CONFIG_ST_TRUSTED_TOUCH if (atomic_read(&info->trusted_touch_enabled)) wait_for_completion_interruptible( &info->trusted_touch_powerdown); #endif __pm_wakeup_event(info->wakeup_source, HZ); fts_chip_power_switch(info, true); Loading