summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/ingenic-battery.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-24power/supply: ingenic-battery: Don't print error on -EPROBE_DEFERPaul Cercueil1-1/+2
Don't print an error message if devm_power_supply_register() returns -EPROBE_DEFER, since the driver will simply re-probe later. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-12-19power/supply: ingenic-battery: Don't change scale if there's only onePaul Cercueil1-4/+11
The ADC in the JZ4740 can work either in high-precision mode with a 2.5V range, or in low-precision mode with a 7.5V range. The code in place in this driver will select the proper scale according to the maximum voltage of the battery. The JZ4770 however only has one mode, with a 6.6V range. If only one scale is available, there's no need to change it (and nothing to change it to), and trying to do so will fail with -EINVAL. Fixes: fb24ccfbe1e0 ("power: supply: add Ingenic JZ47xx battery driver.") Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Artur Rojek <contact@artur-rojek.eu> Cc: stable@vger.kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-18power: supply: add Ingenic JZ47xx battery driver.Artur Rojek1-0/+184
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>