himax_mmi: suspend IC when EARLY_EVENT_BLANK triggered

LCD driver will turn off VDD power after EARLY_EVENT_BLANK event sent.
So TP driver need suspend IC when got this event.
Otherwise, I2C transfer timeout will happen.

Change-Id: I181377fc88a00ffed2e7fefd305ff2e2e4e04ade
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1223414
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
haojl2 2018-08-09 15:23:33 +08:00 • committed by Jialei Hao
commit e1dcbeffdf

View file

@ -683,20 +683,26 @@ int fb_notifier_callback(struct notifier_block *self,
container_of(self, struct himax_ts_data, fb_notif);
I(" %s\n", __func__);
if (evdata && evdata->data && event == FB_EVENT_BLANK && ts &&
ts->client) {
if (evdata && evdata->data && ts && ts->client) {
blank = evdata->data;
switch (*blank) {
case FB_BLANK_UNBLANK:
himax_common_resume(&ts->client->dev);
break;
case FB_BLANK_POWERDOWN:
case FB_BLANK_HSYNC_SUSPEND:
case FB_BLANK_VSYNC_SUSPEND:
case FB_BLANK_NORMAL:
himax_common_suspend(&ts->client->dev);
break;
if (event == FB_EARLY_EVENT_BLANK) {
switch (*blank) {
case FB_BLANK_POWERDOWN:
himax_common_suspend(&ts->client->dev);
break;
}
} else if (event == FB_EVENT_BLANK) {
switch (*blank) {
case FB_BLANK_UNBLANK:
himax_common_resume(&ts->client->dev);
break;
case FB_BLANK_POWERDOWN:
case FB_BLANK_HSYNC_SUSPEND:
case FB_BLANK_VSYNC_SUSPEND:
case FB_BLANK_NORMAL:
himax_common_suspend(&ts->client->dev);
break;
}
}
}