power: supply: max17040: Correct voltage reading
authorJonathan Bakker <xc-racer2@live.ca>
Mon, 4 May 2020 22:12:58 +0000 (15:12 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 10 May 2020 20:00:02 +0000 (22:00 +0200)
commit0383024f811aa469df258039807810fc3793a105
tree4756bbf2ec63ec01fcddf03c8b6ce24ac373fce2
parent29e9eff40f5edc2e5de63b28e700e82ed2b6b95c
power: supply: max17040: Correct voltage reading

According to the datasheet available at (1), the bottom four
bits are always zero and the actual voltage is 1.25x this value
in mV.  Since the kernel API specifies that voltages should be in
uV, it should report 1250x the shifted value.

1) https://datasheets.maximintegrated.com/en/ds/MAX17040-MAX17041.pdf

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max17040_battery.c