input: himax_v2_mmi: change resume timing for hx83102d

HX83102D is a low tier IC, need to create baseline early, so move
resume to early blank, but need to avoid lcd reset conflict, so
add some delay for this.

Change-Id: I3c98e3e41c5a1ee68084b4ffd0e69f76e3b51d8b
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1512722
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2020-03-13 12:33:18 +08:00 • committed by Yeqing Wang
commit 0cc57e5d5d
4 changed files with 31 additions and 0 deletions

View file

@ -3613,7 +3613,11 @@ FW_force_upgrade:
E("%s: create ts_resume workqueue failed\n", __func__);
goto err_create_ts_resume_wq_failed;
}
#if defined(__HIMAX_HX83102D_MOD__)
INIT_DELAYED_WORK(&ts->ts_int_work, himax_resume_work_func);
#else
INIT_WORK(&ts->ts_int_work, himax_resume_work_func);
#endif
#endif
/*Himax Power On and Load Config*/
if (himax_loadSensorConfig(pdata)) {
@ -3758,7 +3762,11 @@ err_input_register_device_failed:
input_free_device(ts->input_dev);
err_detect_failed:
#ifdef HX_RESUME_SET_FW
#if defined(__HIMAX_HX83102D_MOD__)
cancel_delayed_work_sync(&ts->ts_int_work);
#else
cancel_work_sync(&ts->ts_int_work);
#endif
destroy_workqueue(ts->ts_int_workqueue);
err_create_ts_resume_wq_failed:
#endif

View file

@ -455,7 +455,11 @@ struct himax_ts_data {
#endif
#ifdef HX_RESUME_SET_FW
struct workqueue_struct *ts_int_workqueue;
#if defined(__HIMAX_HX83102D_MOD__)
struct delayed_work ts_int_work;
#else
struct work_struct ts_int_work;
#endif
#endif
struct workqueue_struct *himax_diag_wq;

View file

@ -2026,13 +2026,21 @@ static void himax_mcu_pin_reset(void)
I("%s: Now reset the Touch chip,private_ts->vdd_1v8_always_on = %d \n",
__func__,private_ts->vdd_1v8_always_on);
himax_rst_gpio_set(private_ts->rst_gpio, 0);
#if defined(__HIMAX_HX83102_MOD__)
msleep(5);
#else
if(private_ts->vdd_1v8_always_on)
msleep(10);
else
msleep(20);
#endif
himax_rst_gpio_set(private_ts->rst_gpio, 1);
#ifdef HX_ZERO_FLASH
#if defined(__HIMAX_HX83102_MOD__)
msleep(2);
#else
msleep(10);
#endif
#else
msleep(50);
#endif

View file

@ -874,7 +874,12 @@ void himax_resume_thread_func(void)
{
struct himax_ts_data *ts = private_ts;
I("%s: TP resume from thread\n", __func__);
#if defined(__HIMAX_HX83102D_MOD__)
queue_delayed_work(ts->ts_int_workqueue,
&ts->ts_int_work, msecs_to_jiffies(60));
#else
queue_work(ts->ts_int_workqueue, &ts->ts_int_work);
#endif
return;
}
#endif
@ -936,6 +941,12 @@ int drm_notifier_callback(struct notifier_block *self,
}
#endif
break;
#if defined(__HIMAX_HX83102D_MOD__)
case MSM_DRM_BLANK_UNBLANK:
D("DRM_EARLY_EVENT_BLANK resume.\n");
himax_common_resume(ts->dev);
return 0;
#endif
}
}