mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
charger: register battery psy init in time
Need handle battery psy init done notifier in time to register other battery psy l(CR) battery/age for upperlayer wait for. Change-Id: I88fdd6318d8a5c7b0013bb4087f726aacf50cb25 Signed-off-by: Xunjie Xu <xuxj12@motorola.com> Reviewed-on: https://gerrit.mot.com/2902421 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wentao Xu <xuwt2@motorola.com> Reviewed-by: Tao Sun <suntao2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
1f7832123e
commit
d979552f9b
1 changed files with 5 additions and 0 deletions
|
|
@ -2628,6 +2628,11 @@ static int mmi_psy_notifier_call(struct notifier_block *nb, unsigned long val,
|
|||
if (val != PSY_EVENT_PROP_CHANGED)
|
||||
return NOTIFY_OK;
|
||||
|
||||
if (psy && !chip->batt_psy &&
|
||||
(strcmp(psy->desc->name, "battery") == 0)) {
|
||||
mmi_battery_supply_init(chip);
|
||||
}
|
||||
|
||||
if (psy &&
|
||||
((strcmp(psy->desc->name, "battery") == 0) ||
|
||||
(strcmp(psy->desc->name, "usb") == 0) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue