power: supply: ab8500_charger: Restrict ADC retrieveal
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:24 +0000 (01:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 19:24:53 +0000 (20:24 +0100)
commit0f6dad11fdf765a2fc89ef86961efcfcf94b5d0a
tree434bd4f60b4f32298087ab240d2fae79b8d27941
parent75ee3f6f0c1a0b70b9afc2b758566aa49c3cf978
power: supply: ab8500_charger: Restrict ADC retrieveal

The AB8505 only has two ADC channels: the voltage and current
provided from VBUS (USB). It does not support AC charging at all.
Make sure we don't try to retrieve the non-existing channels.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_charger.c