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 adds initial support for detecting USB cables and managing
basic battery charging.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
Caleb Connolly 2022-10-08 19:37:51 +01:00 committed by Jami Kettunen
parent e5788ea5dd
commit 15864e39c0
3 changed files with 1099 additions and 0 deletions

View file

@ -918,4 +918,20 @@ config BATTERY_UG3105
device is off or suspended, the functionality of this driver is
limited to reporting capacity only.
config CHARGER_QCOM_SMB2
tristate "Qualcomm PMI8998 PMIC charger driver"
depends on MFD_SPMI_PMIC
depends on IIO
select QCOM_SPMI_RRADC
help
Driver for the "SMB2" charger block found on Qualcomm PMI8998
and PM660 PMICs.
The charger features automatic power source detection via BC1.2,
automatic input current limiting and reports the realtime voltage
and current via the Round Robin ADC.
Say Y or M here to enable reporting the charger status and rate on
supported platforms such as Snapdragon 845 and 835 based phones.
endif # POWER_SUPPLY

View file

@ -83,6 +83,7 @@ obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o
obj-$(CONFIG_CHARGER_MP2629) += mp2629_charger.o
obj-$(CONFIG_CHARGER_MT6360) += mt6360_charger.o
obj-$(CONFIG_CHARGER_MT6370) += mt6370-charger.o
obj-$(CONFIG_CHARGER_QCOM_SMB2) += qcom_pmi8998_charger.o
obj-$(CONFIG_CHARGER_QCOM_SMBB) += qcom_smbb.o
obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o
obj-$(CONFIG_CHARGER_BQ24190) += bq24190_charger.o

File diff suppressed because it is too large Load diff