]> asedeno.scripts.mit.edu Git - linux.git/commit
power: supply: axp288_fuel_gauge: Get iio-channels once during boot
authorHans de Goede <hdegoede@redhat.com>
Tue, 26 Dec 2017 12:59:10 +0000 (13:59 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Mon, 8 Jan 2018 17:38:57 +0000 (18:38 +0100)
commit331645e165a9b40b49d9cb495bb5ea37850b57a7
tree60c1ce01432cb101fb50669d331094697bcb81f3
parent165c2357744e41391902a2a72dd170beb60c28d5
power: supply: axp288_fuel_gauge: Get iio-channels once during boot

Get iio-channels once during boot, delaying the probe if the axp288_adc
drivers has not loaded yet, instead of getting them on demand each time
we need them.

This fixes the following errors in dmesg:

axp288_fuel_gauge axp288_fuel_gauge: ADC charge current read failed:-19

Which were caused by the ondemand iio-channel read code not finding the
channel when the axp288_adc driver had not loaded yet.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/axp288_fuel_gauge.c