Skip to content

Commit 6b402bd

Browse files
committed
Merge tag 'for-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull more power-supply updates from Sebastian Reichel: "The power-supply subsystem has a few more changes for the v4.12 merge window: - New battery driver for AXP20X and AXP22X PMICs - Improve max17042_battery for usage on x86 - Misc small cleanups & fixes" * tag 'for-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (34 commits) power: supply: cpcap-charger: Keep trickle charger bits disabled power: supply: cpcap-charger: Fix enable for 3.8V charge setting power: supply: cpcap-charger: Fix charge voltage configuration power: supply: cpcap-charger: Fix charger name power: supply: twl4030-charger: make twl4030_bci_property_is_writeable static power: supply: sbs-battery: Add alert callback mailmap: add Sebastian Reichel power: supply: avoid unused twl4030-madc.h power: supply: sbs-battery: Correct supply status with current draw power: supply: sbs-battery: Don't ignore the first external power change power: supply: pda_power: move from timer to delayed_work power: supply: max17042_battery: Add support for the SCOPE property power: supply: max17042_battery: Add support for the CHARGE_NOW property power: supply: max17042_battery: Add support for the CHARGE_FULL_DESIGN property power: supply: max17042_battery: mAh readings depend on r_sns value power: supply: max17042_battery: Add support for the VOLT_MIN property power: supply: max17042_battery: Add support for the TECHNOLOGY attribute power: supply: max17042_battery: Add external_power_changed callback power: supply: max17042_battery: Add support for the STATUS property power: supply: max17042_battery: Add default platform_data fallback data ...
2 parents 6a776e4 + 35f4f99 commit 6b402bd

18 files changed

+975
-173
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ Santosh Shilimkar <[email protected]>
146146
Santosh Shilimkar <[email protected]>
147147
Sascha Hauer <[email protected]>
148148
S.Çağlar Onur <[email protected]>
149+
150+
149151
150152
151153
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
AXP20x and AXP22x battery power supply
2+
3+
Required Properties:
4+
- compatible, one of:
5+
"x-powers,axp209-battery-power-supply"
6+
"x-powers,axp221-battery-power-supply"
7+
8+
This node is a subnode of the axp20x/axp22x PMIC.
9+
10+
The AXP20X and AXP22X can read the battery voltage, charge and discharge
11+
currents of the battery by reading ADC channels from the AXP20X/AXP22X
12+
ADC.
13+
14+
Example:
15+
16+
&axp209 {
17+
battery_power_supply: battery-power-supply {
18+
compatible = "x-powers,axp209-battery-power-supply";
19+
}
20+
};

drivers/power/supply/Kconfig

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,26 @@ config CHARGER_AXP20X
238238
This driver can also be built as a module. If so, the module will be
239239
called axp20x_ac_power.
240240

241+
config BATTERY_AXP20X
242+
tristate "X-Powers AXP20X battery driver"
243+
depends on MFD_AXP20X
244+
depends on AXP20X_ADC
245+
depends on IIO
246+
help
247+
Say Y here to enable support for X-Powers AXP20X PMICs' battery power
248+
supply.
249+
250+
This driver can also be built as a module. If so, the module will be
251+
called axp20x_battery.
252+
253+
config AXP20X_POWER
254+
tristate "AXP20x power supply driver"
255+
depends on MFD_AXP20X
256+
depends on IIO
257+
help
258+
This driver provides support for the power supply features of
259+
AXP20x PMIC.
260+
241261
config AXP288_CHARGER
242262
tristate "X-Powers AXP288 Charger"
243263
depends on MFD_AXP20X && EXTCON_AXP288
@@ -541,11 +561,4 @@ config CHARGER_RT9455
541561
help
542562
Say Y to enable support for Richtek RT9455 battery charger.
543563

544-
config AXP20X_POWER
545-
tristate "AXP20x power supply driver"
546-
depends on MFD_AXP20X
547-
help
548-
This driver provides support for the power supply features of
549-
AXP20x PMIC.
550-
551564
endif # POWER_SUPPLY

drivers/power/supply/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ obj-$(CONFIG_TEST_POWER) += test_power.o
1818

1919
obj-$(CONFIG_BATTERY_88PM860X) += 88pm860x_battery.o
2020
obj-$(CONFIG_BATTERY_ACT8945A) += act8945a_charger.o
21+
obj-$(CONFIG_BATTERY_AXP20X) += axp20x_battery.o
2122
obj-$(CONFIG_CHARGER_AXP20X) += axp20x_ac_power.o
2223
obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
2324
obj-$(CONFIG_BATTERY_DS2780) += ds2780_battery.o

drivers/power/supply/ab8500_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3238,7 +3238,7 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
32383238
BUS_PP_PRECHG_CURRENT_MASK, 0);
32393239
if (ret) {
32403240
dev_err(di->dev,
3241-
"failed to setup usb power path prechage current\n");
3241+
"failed to setup usb power path precharge current\n");
32423242
goto out;
32433243
}
32443244
}

0 commit comments

Comments
 (0)