touch: goodix: fix suspend resume sequence for dual touch case
Touch resume and suspend is done only when core_module_prob_sate global variable is set to probed state. In case of dual touch, if secondary probe fails, core_module_prob_sate is updated to probe failed state. Due to this, suspend or resume calls for primary touch returns early even though primary touch probe is successful. This leads to primary touch remain always on. To fix this, add a new ready variable in touch data structure and perform suspend or resume operations when ready flag is set to true. Change-Id: I7b93a5b3135736caa3e2b5aaf6ff7d8adf4dee9d Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
This commit is contained in:
@@ -2298,7 +2298,7 @@ static int goodix_ts_suspend_helper(void *data)
|
||||
{
|
||||
struct goodix_ts_core *core_data = data;
|
||||
|
||||
if (!core_data || core_module_prob_sate != CORE_MODULE_PROB_SUCCESS)
|
||||
if (!core_data || !core_data->ready)
|
||||
return 0;
|
||||
|
||||
return goodix_ts_suspend(core_data);
|
||||
@@ -2308,7 +2308,7 @@ static int goodix_ts_resume_helper(void *data)
|
||||
{
|
||||
struct goodix_ts_core *core_data = data;
|
||||
|
||||
if (!core_data || core_module_prob_sate != CORE_MODULE_PROB_SUCCESS)
|
||||
if (!core_data || !core_data->ready)
|
||||
return 0;
|
||||
|
||||
return goodix_ts_resume(core_data);
|
||||
@@ -2590,6 +2590,7 @@ skip_to_power_gpio_setup:
|
||||
core_data->init_stage = CORE_INIT_STAGE1;
|
||||
goodix_modules.core_data = core_data;
|
||||
core_module_prob_sate = CORE_MODULE_PROB_SUCCESS;
|
||||
core_data->ready = true;
|
||||
|
||||
/* Try start a thread to get config-bin info */
|
||||
goodix_start_later_init(core_data);
|
||||
|
@@ -513,7 +513,7 @@ struct goodix_ts_core {
|
||||
struct notifier_block ts_notifier;
|
||||
struct goodix_ts_esd ts_esd;
|
||||
bool esd_initialized;
|
||||
|
||||
bool ready;
|
||||
#if defined(CONFIG_DRM)
|
||||
struct notifier_block fb_notifier;
|
||||
void *notifier_cookie;
|
||||
|
Reference in New Issue
Block a user