power: supply: qcom_battmgr: Report capacity on X1E80100
Subsystems (2)
PATCH 1/1 power: supply: qcom_battmgr: Report capacity on X1E80100
Commit 3f87baacea4d ("power: supply: qcom_battmgr: Report battery capacity") added POWER_SUPPLY_PROP_CAPACITY to the SC8280XP battery properties, computed from the firmware's charge and last-full values. When commit cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support") later gave X1E80100 a property table of its own, the table was copied without the capacity property, so X1E80100 machines expose energy_now and energy_full but no capacity.
The percentage is already computed for this variant in the shared SC8280XP callback; only the property list is missing it. Add it, in the same place it sits in the SC8280XP table.
Tested on a Dell XPS 13 9345: capacity reads 94 with energy_now 52640000 and energy_full 55540000.
--- drivers/power/supply/qcom_battmgr.c | 1 + 1 file changed, 1 insertion(+)
drivers/power/supply/qcom_battmgr.c +1 -0
@@ -830,6 +830,7 @@ static const enum power_supply_property x1e80100_bat_props[] = {POWER_SUPPLY_PROP_STATUS ,POWER_SUPPLY_PROP_PRESENT ,POWER_SUPPLY_PROP_TECHNOLOGY , +POWER_SUPPLY_PROP_CAPACITY ,POWER_SUPPLY_PROP_CYCLE_COUNT ,POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN , POWER_SUPPLY_PROP_VOLTAGE_NOW,
Signature · 1 line
2.55.0
Quoted 12 lines · Liviu Nicoara
Commit
3f87baacea4d("power: supply:qcom_battmgr: Report battery capacity") addedPOWER_SUPPLY_PROP_CAPACITYto the SC8280XP battery properties, computed from the firmware's charge and last-full values. When commitcc3e883a0625("power: supply:qcom_battmgr: Add charge control support") later gave X1E80100 a property table of its own, the table was copied without the capacity property, so X1E80100 machines exposeenergy_nowandenergy_fullbut no capacity.The percentage is already computed for this variant in the shared SC8280XP callback; only the property list is missing it. Add it, in the same place it sits in the SC8280XP table.
Quoted 6 lines
Tested on a Dell XPS 13 9345: capacity reads 94 with
energy_now52640000 andenergy_full55540000.Fixes cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support")Signed-off-by Liviu Nicoara <[email protected]>---
Konrad
Sebastian Reichel
AppliedQuoted 9 lines · Liviu Nicoara
Commit
3f87baacea4d("power: supply:qcom_battmgr: Report battery capacity") addedPOWER_SUPPLY_PROP_CAPACITYto the SC8280XP battery properties, computed from the firmware's charge and last-full values. When commitcc3e883a0625("power: supply:qcom_battmgr: Add charge control support") later gave X1E80100 a property table of its own, the table was copied without the capacity property, so X1E80100 machines exposeenergy_nowandenergy_fullbut no capacity.[...]
Applied, thanks!
[1/1] power: supply: qcom_battmgr: Report capacity on X1E80100
commit: f7c62ebfd9127b12a1e39f1cc7f3131cb3065886
Best regards,
Signature · 1 line
Sebastian Reichel <[email protected]>