Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0010542d authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a time




[ Upstream commit 4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258 ]

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

This fixes charge_full reporting 3498768 on some reads and 3354624 one
other reads on my tablet (for the 3354624 value the raw LSB is 0x00).

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9a5790b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment