power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time
authorHans de Goede <hdegoede@redhat.com>
Wed, 14 Dec 2016 16:38:52 +0000 (17:38 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 20:59:17 +0000 (21:59 +0100)
commit248efcf00602f0282587999bcc221a872bd72530
tree8c38b0b13a6bd5c99d5e0fe79c622d0f394fa1ad
parent4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258
power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time

In order for the MSB -> LSB latching to work correctly we must read the
2 8 bit registers of a 12 bit value in one consecutive read.

This fixes voltage_ocv reporting inconsistent values on my tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/axp288_fuel_gauge.c