diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c index 29fafccf2dc2..85cf7f3d8e34 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c @@ -186,6 +186,14 @@ static void ts_mmi_queued_resume(struct ts_mmi_dev *touch_cdev) if (atomic_cmpxchg(&touch_cdev->touch_stopped, 1, 0) == 0) return; +#ifdef TS_MMI_TOUCH_MULTIWAY_UPDATE_FW + if (touch_cdev->flash_mode == FW_PARAM_MODE &&\ + touch_cdev->pdata.fw_load_resume) { + dev_info(DEV_MMI, "%s: send sysfs notify to touchUpg\n", __func__); + sysfs_notify(touch_cdev->mdata->exports.kobj_notify, NULL, "flash_mode"); + } +#endif + TRY_TO_CALL(pre_resume); /* touch IC baseline update always done when IC resume. diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c index 8cbc1f392902..9fb489180c92 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c @@ -71,6 +71,11 @@ int ts_mmi_parse_dt(struct ts_mmi_dev *touch_cdev, dev_info(DEV_TS, "%s: using %u reset on resume\n", __func__, ppdata->reset); + if (of_property_read_bool(of_node, "mmi,fw-load-on-resume")) { + dev_info(DEV_TS, "%s: load firmware on resume\n", __func__); + ppdata->fw_load_resume = true; + } + if (of_property_read_bool(of_node, "mmi,power-off-suspend")) { dev_info(DEV_TS, "%s: using power off in suspend\n", __func__); ppdata->power_off_suspend = true; diff --git a/include/linux/touchscreen_mmi.h b/include/linux/touchscreen_mmi.h index aaa222040af6..c12d86b01bc8 100644 --- a/include/linux/touchscreen_mmi.h +++ b/include/linux/touchscreen_mmi.h @@ -340,6 +340,7 @@ struct ts_mmi_dev_pdata { bool update_refresh_rate; bool gestures_enabled; bool palm_enabled; + bool fw_load_resume; bool suppression_ctrl; bool pill_region_ctrl; bool hold_distance_ctrl;