fg: get current in real time

some feature need to get current in real time
for rt9426a.

Change-Id: I28afc6471c771748db0edb7b8a433cfd9dc6c55a
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2146513
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-12-16 16:00:03 +08:00 • committed by Haijian Ma
commit c18b814d11

View file

@ -1163,6 +1163,7 @@ static int rt_fg_get_property(struct power_supply *psy,
val->intval = rt9426a_get_design_capacity(chip) * 1000;
break;
case POWER_SUPPLY_PROP_CURRENT_NOW:
rt9426a_get_current(chip);
val->intval = chip->bcurr * 1000 * (-1);
break;
case POWER_SUPPLY_PROP_TEMP: