]> www.infradead.org Git - users/jedix/linux-maple.git/commit
power: supply: max17042: add platform driver variant
authorDzmitry Sankouski <dsankouski@gmail.com>
Tue, 7 Jan 2025 09:31:31 +0000 (12:31 +0300)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 15 Jan 2025 21:00:32 +0000 (22:00 +0100)
commit0cd4f1f77ad4f021cd56aad00c1914583c3ddf3c
tree3486d499158b02671438f41ee76aedba656e499c
parentbed41f08e222efb6f77a3a68e847b7a1ad994e62
power: supply: max17042: add platform driver variant

Maxim PMICs may include fuel gauge with additional features, which is
out of single Linux power supply driver scope.

For example, in max77705 PMIC fuelgauge has additional registers, like
IIN_REG, VSYS_REG, ISYS_REG. Those needed to measure PMIC input current,
system voltage and current respectively. Those measurements cannot be
bound to any of fuelgauge properties.

The solution here add and option to use max17042 driver as a MFD sub
device, thus allowing any additional functionality be implemented as
another sub device. This will help to reduce code duplication in MFD
fuel gauge drivers.

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Link: https://lore.kernel.org/r/20250107-b4-max17042-v6-2-3d0104ad5bc7@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max17042_battery.c