input: touchscreen: fts_spi: introduce fts mode handler worker

Change-Id: Ia99536c76560bbc92bf564d47caa63f9a857176b
This commit is contained in:
Cosmin Tanislav 2021-09-10 02:01:48 +03:00 committed by Giovanni Ricca
parent b985ec6627
commit b47c312106
No known key found for this signature in database
2 changed files with 11 additions and 0 deletions

View File

@ -6805,6 +6805,15 @@ static void fts_suspend_work(struct work_struct *work)
/**@}*/
static void fts_mode_handler_work(struct work_struct *work)
{
struct fts_ts_info *info;
info = container_of(work, struct fts_ts_info, mode_handler_work);
fts_mode_handler(info, 0);
}
/**
* Callback function used to detect the suspend/resume events generated by clicking the power button.
* This function schedule a suspend or resume work according to the event received.
@ -8455,6 +8464,7 @@ static int fts_probe(struct spi_device *client)
INIT_WORK(&info->resume_work, fts_resume_work);
INIT_WORK(&info->suspend_work, fts_suspend_work);
INIT_WORK(&info->sleep_work, fts_ts_sleep_work);
INIT_WORK(&info->mode_handler_work, fts_mode_handler_work);
init_completion(&info->tp_reset_completion);
#ifdef FTS_XIAOMI_TOUCHFEATURE
init_waitqueue_head(&info->wait_queue);

View File

@ -334,6 +334,7 @@ struct fts_ts_info {
struct work_struct resume_work;
struct work_struct cmd_update_work;
struct work_struct sleep_work;
struct work_struct mode_handler_work;
struct workqueue_struct *event_wq;
struct workqueue_struct *irq_wq;
struct workqueue_struct *touch_feature_wq;