mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
power: supply: qti_battery_charger: Add TIME_TO_FULL_NOW property
Report TIME_TO_FULL_NOW battery power-supply class property required by userspace. Change-Id: Idc5ea4718bd9537e46191d254fa2e3e252141041 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
This commit is contained in:
parent
5702001dfb
commit
18baafdbfd
1 changed files with 8 additions and 0 deletions
|
|
@ -1015,6 +1015,13 @@ static int battery_psy_get_prop(struct power_supply *psy,
|
|||
|
||||
pval->intval = -ENODATA;
|
||||
|
||||
/*
|
||||
* The prop id of TIME_TO_FULL_NOW and TIME_TO_FULL_AVG is same.
|
||||
* So, map the prop id of TIME_TO_FULL_AVG for TIME_TO_FULL_NOW.
|
||||
*/
|
||||
if (prop == POWER_SUPPLY_PROP_TIME_TO_FULL_NOW)
|
||||
prop = POWER_SUPPLY_PROP_TIME_TO_FULL_AVG;
|
||||
|
||||
prop_id = get_property_id(pst, prop);
|
||||
if (prop_id < 0)
|
||||
return prop_id;
|
||||
|
|
@ -1099,6 +1106,7 @@ static enum power_supply_property battery_props[] = {
|
|||
POWER_SUPPLY_PROP_CHARGE_FULL,
|
||||
POWER_SUPPLY_PROP_MODEL_NAME,
|
||||
POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,
|
||||
POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
|
||||
POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG,
|
||||
POWER_SUPPLY_PROP_POWER_NOW,
|
||||
POWER_SUPPLY_PROP_POWER_AVG,
|
||||
|
|
|
|||
Loading…
Reference in a new issue