Commit 46c202b5 authored by Quentin Schulz's avatar Quentin Schulz Committed by Sebastian Reichel

power: supply: add battery driver for AXP20X and AXP22X PMICs

The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply.

This patch adds the battery power supply driver to get various data from
the PMIC, such as the battery status (charging, discharging, full,
dead), current max limit, current current, battery capacity (in
percentage), voltage max and min limits, current voltage and battery
capacity (in Ah).

This battery driver uses the AXP20X/AXP22X ADC driver as PMIC data
provider.
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 7221675c
...@@ -238,6 +238,18 @@ config CHARGER_AXP20X ...@@ -238,6 +238,18 @@ config CHARGER_AXP20X
This driver can also be built as a module. If so, the module will be This driver can also be built as a module. If so, the module will be
called axp20x_ac_power. called axp20x_ac_power.
config BATTERY_AXP20X
tristate "X-Powers AXP20X battery driver"
depends on MFD_AXP20X
depends on AXP20X_ADC
depends on IIO
help
Say Y here to enable support for X-Powers AXP20X PMICs' battery power
supply.
This driver can also be built as a module. If so, the module will be
called axp20x_battery.
config AXP288_CHARGER config AXP288_CHARGER
tristate "X-Powers AXP288 Charger" tristate "X-Powers AXP288 Charger"
depends on MFD_AXP20X && EXTCON_AXP288 depends on MFD_AXP20X && EXTCON_AXP288
......
...@@ -18,6 +18,7 @@ obj-$(CONFIG_TEST_POWER) += test_power.o ...@@ -18,6 +18,7 @@ obj-$(CONFIG_TEST_POWER) += test_power.o
obj-$(CONFIG_BATTERY_88PM860X) += 88pm860x_battery.o obj-$(CONFIG_BATTERY_88PM860X) += 88pm860x_battery.o
obj-$(CONFIG_BATTERY_ACT8945A) += act8945a_charger.o obj-$(CONFIG_BATTERY_ACT8945A) += act8945a_charger.o
obj-$(CONFIG_BATTERY_AXP20X) += axp20x_battery.o
obj-$(CONFIG_CHARGER_AXP20X) += axp20x_ac_power.o obj-$(CONFIG_CHARGER_AXP20X) += axp20x_ac_power.o
obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
obj-$(CONFIG_BATTERY_DS2780) += ds2780_battery.o obj-$(CONFIG_BATTERY_DS2780) += ds2780_battery.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment