From: Marek Vasut Date: Fri, 14 Oct 2022 17:24:21 +0000 (+0200) Subject: power: supply: bq25890: Document POWER_SUPPLY_PROP_CURRENT_NOW X-Git-Tag: v6.6.7~3872^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef1ca2102e9c546a507ed43994f5dd022f7a80d3;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index 6020b58..1298d57 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//current_now + */ ret = bq25890_field_read(bq, F_ICHGR); /* read measured value */ if (ret < 0) return ret;