mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
MMI: Add DC psy notifier
The tree modules(p938x, smbcharger-mmi, qpnp-smb5) work togegher to handle the logic of wireless charging. In smbcharger-mmi, MMI_HB_VOLTER will hold dc suspend until heartbeat work detect DC present, In qpnp-smb5, dcin-plugin irq handle DC present status. they are all triggered asynchronously in parallel, and the DC present is always active after p938x VOUT_ON has been set for a while. And yet, at this point, smbcharger-mmi's heartbeat work has been triggered by wireless psy change when p938x is VOUT_ON. This leads to MMI_HB_VOLTER hold dc suspend in a minute to wait heartbeat schedule again by itself Change-Id: Idc8b62fa47975daeba3f0875d7715771fa8141a8 Signed-off-by: xuwt2 <xuwt2@lenovo.com> Reviewed-on: https://gerrit.mot.com/1479568 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
e3f32778f7
commit
6b6a1d0b9c
1 changed files with 3 additions and 1 deletions
|
|
@ -3262,7 +3262,9 @@ static int mmi_psy_notifier_call(struct notifier_block *nb, unsigned long val,
|
|||
|
||||
if (psy &&
|
||||
((strcmp(psy->desc->name, "usb") == 0) ||
|
||||
(strcmp(psy->desc->name, "wireless") == 0))) {
|
||||
(strcmp(psy->desc->name, "wireless") == 0) ||
|
||||
(strcmp(psy->desc->name, "dc") == 0))) {
|
||||
|
||||
cancel_delayed_work(&chip->heartbeat_work);
|
||||
schedule_delayed_work(&chip->heartbeat_work,
|
||||
msecs_to_jiffies(0));
|
||||
|
|
|
|||
Loading…
Reference in a new issue