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)
commit63e67c5769c23e0af729ecc2d28e4326f3a67a08
treea596034cdaf72b895e497cba37616639545b2839
parentadcf04c9f8fce54e65f11bae2fbd37c1282ef128
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