Skip to content

Commit 8648aeb

Browse files
kcxtsre
authored andcommitted
power: supply: add Qualcomm PMI8998 SMB2 Charger driver
Add a driver for the SMB2 charger block found in the Qualcomm PMI8998 and PM660. This driver is capable of utilising Qualcomm's Automatic Power Source Detection (APSD) BC1.2 implementation, as well as Automatic Input Current Limiting (AICL) to configure the maximum input current limit of DCP (wall) chargers. Quick Charge is not currently supported. Most devices using the smb2 charger have a secondary dedicated charger chip which is used in parallel to enable faster charger without overheating. However, not all do, as a result to ensure safety until these are supported, the maximum current is limited to ~1A via the FAST_CHARGE_CURRENT_CFG register. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Tested-by: Joel Selvaraj <joelselvaraj.oss@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 4a6598c commit 8648aeb

3 files changed

Lines changed: 1069 additions & 0 deletions

File tree

drivers/power/supply/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,4 +934,13 @@ config BATTERY_UG3105
934934
device is off or suspended, the functionality of this driver is
935935
limited to reporting capacity only.
936936

937+
config CHARGER_QCOM_SMB2
938+
tristate "Qualcomm PMI8998 PMIC charger driver"
939+
depends on MFD_SPMI_PMIC
940+
depends on IIO
941+
help
942+
Say Y here to enable the Qualcomm PMIC Charger driver. This
943+
adds support for the SMB2 switch mode battery charger found
944+
in PMI8998 and related PMICs.
945+
937946
endif # POWER_SUPPLY

drivers/power/supply/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ obj-$(CONFIG_BATTERY_ACER_A500) += acer_a500_battery.o
109109
obj-$(CONFIG_BATTERY_SURFACE) += surface_battery.o
110110
obj-$(CONFIG_CHARGER_SURFACE) += surface_charger.o
111111
obj-$(CONFIG_BATTERY_UG3105) += ug3105_battery.o
112+
obj-$(CONFIG_CHARGER_QCOM_SMB2) += qcom_pmi8998_charger.o

0 commit comments

Comments
 (0)