summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-10-14 20:24:21 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2022-10-29 02:40:30 +0300
commitef1ca2102e9c546a507ed43994f5dd022f7a80d3 (patch)
tree704cb6cb19427ec8463672c7045e350504d3a108 /drivers/power
parent03b33d4ac41e4d0bb3e4654f21e06caba4ccb400 (diff)
downloadlinux-ef1ca2102e9c546a507ed43994f5dd022f7a80d3.tar.xz
power: supply: bq25890: Document POWER_SUPPLY_PROP_CURRENT_NOW
Document that POWER_SUPPLY_PROP_CURRENT_NOW really does refer to ADC-sampled immediate battery charge current I_BAT , since the meaning is not clear with all the currents which might be measured by charger chips. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq25890_charger.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
index 6020b58c641d..1298d5720aa4 100644
--- a/drivers/power/supply/bq25890_charger.c
+++ b/drivers/power/supply/bq25890_charger.c
@@ -588,7 +588,14 @@ static int bq25890_power_supply_get_property(struct power_supply *psy,
val->intval = 2304000 + ret * 20000;
break;
- case POWER_SUPPLY_PROP_CURRENT_NOW:
+ case POWER_SUPPLY_PROP_CURRENT_NOW: /* I_BAT now */
+ /*
+ * This is ADC-sampled immediate charge current supplied
+ * from charger to battery. The property name is confusing,
+ * for clarification refer to:
+ * Documentation/ABI/testing/sysfs-class-power
+ * /sys/class/power_supply/<supply_name>/current_now
+ */
ret = bq25890_field_read(bq, F_ICHGR); /* read measured value */
if (ret < 0)
return ret;