linux_dsm_epyc7002/include
Matthias Schiffer 8ff0d8a090 power: supply: bq27xxx: fix power_avg for newer ICs
[ Upstream commit c4d57c22ac65bd503716062a06fad55a01569cac ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:47:24 +02:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
asm-generic
clocksource
crypto random: initialize ChaCha20 constants with correct endianness 2021-05-11 14:47:19 +02:00
drm
dt-bindings
keys
kunit
kvm
linux power: supply: bq27xxx: fix power_avg for newer ICs 2021-05-11 14:47:24 +02:00
math-emu
media
memory
misc
net sch_red: fix off-by-one checks in red_check_params() 2021-04-14 08:42:07 +02:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace
uapi usb: webcam: Invalid size of Processing Unit Descriptor 2021-05-11 14:47:17 +02:00
vdso
video
xen