power: supply: cpcap-battery: Add battery type auto detection for mapphone devices
authorCarl Philipp Klemm <philipp@uvos.xyz>
Wed, 29 Dec 2021 00:08:53 +0000 (01:08 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 1 Feb 2022 11:47:11 +0000 (12:47 +0100)
commitfd46821e85de90fb5b7356251164af4815b6e3f6
tree392bd3fc18cbc1cf19f1148f31d1dc5364279d34
parentd4f408cdcd26921c1268cb8dcbe8ffb6faf837f3
power: supply: cpcap-battery: Add battery type auto detection for mapphone devices

This allows cpcap-battery to detect whitch battery is inserted, HW4X or
BW8X for xt875 and EB41 for xt894 by examining the battery nvmem. If no
known battery is detected sane defaults are used.

Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c