mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Solve the problem of sending command conflicts
TP: When sending multiple commands at the same time, the ack signal of unexpected commands may be read, resulting in command sending errors. Change-Id: I6f222a20725f5adc1509a01bd29f972c3171e56d Reviewed-on: https://gerrit.mot.com/2178632 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8ce498423a
commit
78d8b6b65c
1 changed files with 2 additions and 0 deletions
|
|
@ -781,12 +781,14 @@ static int goodix_ts_mmi_charger_mode(struct device *dev, int mode)
|
|||
|
||||
hw_ops = core_data->hw_ops;
|
||||
|
||||
mutex_lock(&core_data->mode_lock);
|
||||
ret = goodix_ts_send_cmd(core_data, CHARGER_MODE_CMD, 5, mode, 0x00);
|
||||
if (ret < 0) {
|
||||
ts_err("Failed to set charger mode\n");
|
||||
}
|
||||
msleep(20);
|
||||
ts_err("Success to %s charger mode\n", mode ? "Enable" : "Disable");
|
||||
mutex_unlock(&core_data->mode_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue