linux-stable/include/linux/power
Matthias Schiffer c4d57c22ac power: supply: bq27xxx: fix power_avg for newer ICs
On all newer bq27xxx ICs, the AveragePower register contains a signed
value; in addition to handling the raw value as unsigned, the driver
code also didn't convert it to µW as expected.

At least for the BQ28Z610, the reference manual incorrectly states that
the value is in units of 1mW and not 10mW. I have no way of knowing
whether the manuals of other supported ICs contain the same error, or if
there are models that actually use 1mW. At least, the new code shouldn't
be *less* correct than the old version for any device.

power_avg is removed from the cache structure, se we don't have to
extend it to store both a signed value and an error code. Always getting
an up-to-date value may be desirable anyways, as it avoids inconsistent
current and power readings when switching between charging and
discharging.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-03-15 02:26:03 +01:00
..
ab8500.h
bq27xxx_battery.h power: supply: bq27xxx: fix power_avg for newer ICs 2021-03-15 02:26:03 +01:00
bq2415x_charger.h power: fix duplicated words in bq2415x_charger.h 2020-07-27 00:10:14 +02:00
bq24190_charger.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
bq24735-charger.h
charger-manager.h power: supply: charger-manager: Update extcon functions 2020-08-28 19:27:45 +02:00
generic-adc-battery.h power: supply: generic-adc-battery: Use GPIO descriptors 2020-11-30 02:42:42 +01:00
gpio-charger.h power: supply: gpio-charger: Convert to GPIO descriptors 2020-08-27 16:47:14 +02:00
jz4740-battery.h
max17042_battery.h power: supply: max17042: add MAX17055 support 2019-12-19 01:07:53 +01:00
sbs-battery.h
smartreflex.h ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition 2019-11-13 11:33:53 +01:00
twl4030_madc_battery.h