mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Trigger battery current read on demand
Schedule the heartbeat work to update the battery properties if read current_now. Change-Id: I47cdd15911219ce8af268a23acefd4980c081b45 Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2316770 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
ee7e452d82
commit
fc575f57fc
1 changed files with 6 additions and 0 deletions
|
|
@ -2564,6 +2564,12 @@ static int mmi_get_prop(struct power_supply *psy,
|
|||
struct mmi_charger_chip *chip = power_supply_get_drvdata(psy);
|
||||
int rc = 0;
|
||||
|
||||
if (psp == POWER_SUPPLY_PROP_CURRENT_NOW) {
|
||||
cancel_delayed_work(&chip->heartbeat_work);
|
||||
schedule_delayed_work(&chip->heartbeat_work,
|
||||
msecs_to_jiffies(0));
|
||||
}
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_STATUS:
|
||||
val->intval = chip->combo_status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue