Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: core: Add resistance power supply property

Some battery drivers provide the ability to export internal resistance
as a parameter. Add internal_resistance power supply property for that
purpose.

Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Fenglin Wu and committed by
Sebastian Reichel
d69ae81e 1bafaa15

+18
+16
Documentation/ABI/testing/sysfs-class-power
··· 553 553 Integer > 0: representing full cycles 554 554 Integer = 0: cycle_count info is not available 555 555 556 + What: /sys/class/power_supply/<supply_name>/internal_resistance 557 + Date: August 2025 558 + Contact: linux-arm-msm@vger.kernel.org 559 + Description: 560 + Represent the battery's internal resistance, often referred 561 + to as Equivalent Series Resistance (ESR). It is a dynamic 562 + parameter that reflects the opposition to current flow within 563 + the cell. It is not a fixed value but varies significantly 564 + based on several operational conditions, including battery 565 + state of charge (SoC), temperature, and whether the battery 566 + is in a charging or discharging state. 567 + 568 + Access: Read 569 + 570 + Valid values: Represented in microohms 571 + 556 572 **USB Properties** 557 573 558 574 What: /sys/class/power_supply/<supply_name>/input_current_limit
+1
drivers/power/supply/power_supply_sysfs.c
··· 223 223 POWER_SUPPLY_ATTR(MANUFACTURE_YEAR), 224 224 POWER_SUPPLY_ATTR(MANUFACTURE_MONTH), 225 225 POWER_SUPPLY_ATTR(MANUFACTURE_DAY), 226 + POWER_SUPPLY_ATTR(INTERNAL_RESISTANCE), 226 227 /* Properties of type `const char *' */ 227 228 POWER_SUPPLY_ATTR(MODEL_NAME), 228 229 POWER_SUPPLY_ATTR(MANUFACTURER),
+1
include/linux/power_supply.h
··· 176 176 POWER_SUPPLY_PROP_MANUFACTURE_YEAR, 177 177 POWER_SUPPLY_PROP_MANUFACTURE_MONTH, 178 178 POWER_SUPPLY_PROP_MANUFACTURE_DAY, 179 + POWER_SUPPLY_PROP_INTERNAL_RESISTANCE, 179 180 /* Properties of type `const char *' */ 180 181 POWER_SUPPLY_PROP_MODEL_NAME, 181 182 POWER_SUPPLY_PROP_MANUFACTURER,