mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Need to update fw on resume for zero-flash touch IC.
The kernel does not have permission to access the /data/vendor
partition, so send the update firmware notify to touchUpg service
on resume for zero-flash touch IC.
avc: denied { search } for name="param" dev="dm-6" ino=275
scontext=u:r:kernel:s0 tcontext=u:object_r:param_data_file:s0
tclass=dir permissive=0
Change-Id: I5d5c9f39bab25a8d3377e0475e79a0411d93b56b
Reviewed-on: https://gerrit.mot.com/1979786
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
parent
4ddfc550ae
commit
75b0a4d487
3 changed files with 14 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue