Skip to content

Commit 7585340

Browse files
smaeulsre
authored andcommitted
power: supply: Add a driver for Injoinic power bank ICs
This driver supports several chip variants which all share the same I2C register interface. Since the chip will turn off and become inaccessible under conditions outside of software control (e.g. upon button press or input voltage removal), some special handling is needed to delay the initialization of the IC until it is accessible. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 78eb753 commit 7585340

4 files changed

Lines changed: 652 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9461,6 +9461,11 @@ F: include/linux/mfd/ingenic-tcu.h
94619461
F: sound/soc/codecs/jz47*
94629462
F: sound/soc/jz4740/
94639463

9464+
INJOINIC IP5xxx POWER BANK IC DRIVER
9465+
M: Samuel Holland <samuel@sholland.org>
9466+
S: Maintained
9467+
F: drivers/power/supply/ip5xxx_power.c
9468+
94649469
INOTIFY
94659470
M: Jan Kara <jack@suse.cz>
94669471
R: Amir Goldstein <amir73il@gmail.com>

drivers/power/supply/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ config GENERIC_ADC_BATTERY
5151
Say Y here to enable support for the generic battery driver
5252
which uses IIO framework to read adc.
5353

54+
config IP5XXX_POWER
55+
tristate "Injoinic IP5xxx power bank IC driver"
56+
depends on I2C
57+
select REGMAP_I2C
58+
help
59+
Say Y to include support for Injoinic IP5xxx power bank ICs,
60+
which include a battery charger and a boost converter.
61+
5462
config MAX8925_POWER
5563
tristate "MAX8925 battery charger support"
5664
depends on MFD_MAX8925

drivers/power/supply/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ obj-$(CONFIG_GENERIC_ADC_BATTERY) += generic-adc-battery.o
1212
obj-$(CONFIG_PDA_POWER) += pda_power.o
1313
obj-$(CONFIG_APM_POWER) += apm_power.o
1414
obj-$(CONFIG_AXP20X_POWER) += axp20x_usb_power.o
15+
obj-$(CONFIG_IP5XXX_POWER) += ip5xxx_power.o
1516
obj-$(CONFIG_MAX8925_POWER) += max8925_power.o
1617
obj-$(CONFIG_WM831X_BACKUP) += wm831x_backup.o
1718
obj-$(CONFIG_WM831X_POWER) += wm831x_power.o

0 commit comments

Comments
 (0)