touchscreen_mmi: match panel notifier with control dsi

In multiple display configuration, panel notifier will be called for
each display. Control DSI associated with display is passed as a
parameter to panel notifier and will only be actionable in the case
when notification belongs to display.

Change-Id: I6abbf2d34aaedd230ac1de79100babed20ed712b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1482868
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Konstantin Makariev 2020-01-06 15:34:59 -06:00 • committed by Konstantin Makariev
commit 5c64bb1f67

View file

@ -82,12 +82,24 @@ static int inline ts_mmi_panel_on(struct ts_mmi_dev *touch_cdev) {
static int ts_mmi_panel_cb(struct notifier_block *nb,
unsigned long event, void *evd)
{
int idx = evd ? *(int *)evd : -1;
struct ts_mmi_dev *touch_cdev =
container_of(nb, struct ts_mmi_dev, panel_nb);
if (!touch_cdev)
return 0;
#if defined(CONFIG_PANEL_NOTIFICATIONS)
dev_dbg(DEV_MMI,"%s: %s event(%lu), ctrl_dsi=%d, idx=%d\n", __func__,
event == PANEL_EVENT_PRE_DISPLAY_OFF ? "PANEL_EVENT_PRE_DISPLAY_OFF" :
(event == PANEL_EVENT_DISPLAY_OFF ? "PANEL_EVENT_DISPLAY_OFF" :
(event == PANEL_EVENT_PRE_DISPLAY_ON ? "PANEL_EVENT_PRE_DISPLAY_ON" :
(event == PANEL_EVENT_DISPLAY_ON ? "PANEL_EVENT_DISPLAY_ON" : "Unknown"))),
event, touch_cdev->pdata.ctrl_dsi, idx);
#endif
if (touch_cdev->pdata.ctrl_dsi != idx)
return 0;
/* entering suspend upon early blank event */
/* to ensure shared power supply is still on */
/* for in-cell design touch solutions */