]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ltc2941-battery-gauge: Prepare for LTC2942 and LTC2944
authorLadislav Michl <ladis@linux-mips.org>
Sun, 16 Jul 2017 09:33:06 +0000 (11:33 +0200)
committerSebastian Reichel <sre@kernel.org>
Tue, 25 Jul 2017 10:03:23 +0000 (12:03 +0200)
commit1a9070a7d535ca6440df782fc89c0675fd00679d
treea596034cdaf72b895e497cba37616639545b2839
parente63fddf6ea8b41e2e3589a98ac1585cbd04e855e
power: supply: ltc2941-battery-gauge: Prepare for LTC2942 and LTC2944

In order to support LTC2942 which has temperature registers
at different offsets than LTC2943 use following register naming
scheme (prefixes):
- LTC294X_ common registers
- LTC2942_ chips specific registers
- LTC2943_ specific registers

LTC2944 is compatible with LTC2943 but uses different constants
to compute voltage and current, so replace num_regs misused
for device indentification with real device id to discriminate
between those two.

There are no functional changes.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Dragos Bogdan <dragos.bogdan@analog.com>
Tested-by: Dragos Bogdan <dragos.bogdan@analog.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/ltc2941-battery-gauge.c