mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
Continue to probe touch even if no matching panel is found
TP: 1.Continue to probe touchscreen driver even if no matching panel is found to ensure the basic functions of the touchscreen. 2.There is no member "id" in drm_panel_notifier at present, so set id to 0 to ensure touch driver can receive notifications from panel. Change-Id: I2f8c946304be4511bc7ef3422937bfe8ea927a98 Reviewed-on: https://gerrit.mot.com/1745970 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4fd95ed959
commit
440ca970d5
3 changed files with 17 additions and 9 deletions
|
|
@ -599,8 +599,10 @@ int ts_mmi_dev_register(struct device *parent,
|
|||
|
||||
#ifdef CONFIG_DRM_PANEL_NOTIFICATIONS
|
||||
ret = ts_mmi_check_drm_panel(DEV_TS->of_node);
|
||||
if (ret < 0)
|
||||
goto PANEL_PARSE_DT_FAILED;
|
||||
if (ret < 0) {
|
||||
dev_err(DEV_TS, "%s: check drm panel failed. %d\n", __func__, ret);
|
||||
touch_cdev->panel_status = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = ts_mmi_parse_dt(touch_cdev, DEV_TS->of_node);
|
||||
|
|
|
|||
|
|
@ -452,10 +452,12 @@ int ts_mmi_notifiers_register(struct ts_mmi_dev *touch_cdev)
|
|||
*/
|
||||
touch_cdev->pm_mode = TS_MMI_PM_ACTIVE;
|
||||
|
||||
touch_cdev->panel_nb.notifier_call = ts_mmi_panel_cb;
|
||||
ret = register_panel_notifier(&touch_cdev->panel_nb);
|
||||
if (ret)
|
||||
goto PANEL_NOTIF_REGISTER_FAILED;
|
||||
if (!touch_cdev->panel_status) {
|
||||
touch_cdev->panel_nb.notifier_call = ts_mmi_panel_cb;
|
||||
ret = register_panel_notifier(&touch_cdev->panel_nb);
|
||||
if (ret)
|
||||
goto PANEL_NOTIF_REGISTER_FAILED;
|
||||
}
|
||||
|
||||
if (touch_cdev->pdata.update_refresh_rate) {
|
||||
touch_cdev->freq_nb.notifier_call = ts_mmi_refresh_rate_cb;
|
||||
|
|
@ -475,7 +477,8 @@ int ts_mmi_notifiers_register(struct ts_mmi_dev *touch_cdev)
|
|||
return 0;
|
||||
|
||||
FREQ_NOTIF_REGISTER_FAILED:
|
||||
unregister_panel_notifier(&touch_cdev->panel_nb);
|
||||
if (!touch_cdev->panel_status)
|
||||
unregister_panel_notifier(&touch_cdev->panel_nb);
|
||||
PANEL_NOTIF_REGISTER_FAILED:
|
||||
cancel_delayed_work(&touch_cdev->work);
|
||||
PS_NOTIF_REGISTER_FAILED:
|
||||
|
|
@ -500,7 +503,9 @@ void ts_mmi_notifiers_unregister(struct ts_mmi_dev *touch_cdev)
|
|||
if (touch_cdev->pdata.usb_detection)
|
||||
power_supply_unreg_notifier(&touch_cdev->ps_notif);
|
||||
|
||||
unregister_panel_notifier(&touch_cdev->panel_nb);
|
||||
if (!touch_cdev->panel_status)
|
||||
unregister_panel_notifier(&touch_cdev->panel_nb);
|
||||
|
||||
cancel_delayed_work(&touch_cdev->work);
|
||||
kfifo_free(&touch_cdev->cmd_pipe);
|
||||
dev_info(DEV_MMI, "%s:notifiers_unregister finish", __func__);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ struct drm_panel_notifier *evdata = evd; \
|
|||
dev_dbg(DEV_MMI, "%s: invalid evdata\n", __func__); \
|
||||
return 0; \
|
||||
} \
|
||||
idx = *(int *)evd; \
|
||||
idx = 0;\
|
||||
blank = (int *)evdata->data; \
|
||||
dev_dbg(DEV_MMI, "%s: drm notification: event = %lu, blank = %d\n", \
|
||||
__func__, event, *blank); \
|
||||
|
|
@ -362,6 +362,7 @@ struct ts_mmi_dev {
|
|||
struct device *class_dev;
|
||||
dev_t class_dev_no;
|
||||
int forcereflash;
|
||||
int panel_status;
|
||||
struct ts_mmi_dev_pdata pdata;
|
||||
struct notifier_block panel_nb;
|
||||
struct mutex extif_mutex;
|
||||
|
|
|
|||
Loading…
Reference in a new issue