Skip to content

Commit 60cd40e

Browse files
clamor-ssre
authored andcommitted
power: supply: Add support for Maxim MAX8971 charger
The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger for a one-cell lithium-ion (Li+) battery. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://lore.kernel.org/r/20250430055114.11469-3-clamor95@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent c5a0a64 commit 60cd40e

File tree

4 files changed

+810
-0
lines changed

4 files changed

+810
-0
lines changed

Documentation/ABI/testing/sysfs-class-power

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,3 +822,46 @@ Description:
822822
Each entry is a link to the device which registered the extension.
823823

824824
Access: Read
825+
826+
What: /sys/class/power_supply/max8971-charger/fast_charge_timer
827+
Date: May 2025
828+
KernelVersion: 6.15.0
829+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
830+
Description:
831+
This entry shows and sets the maximum time the max8971
832+
charger operates in fast-charge mode. When the timer expires
833+
the device will terminate fast-charge mode (charging current
834+
will drop to 0 A) and will trigger interrupt.
835+
836+
Valid values:
837+
838+
- 4 - 10 (hours), step by 1
839+
- 0: disabled.
840+
841+
What: /sys/class/power_supply/max8971-charger/top_off_threshold_current
842+
Date: May 2025
843+
KernelVersion: 6.15.0
844+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
845+
Description:
846+
This entry shows and sets the charging current threshold for
847+
entering top-off charging mode. When charging current in fast
848+
charge mode drops below this value, the charger will trigger
849+
interrupt and start top-off charging mode.
850+
851+
Valid values:
852+
853+
- 50000 - 200000 (microamps), step by 50000 (rounded down)
854+
855+
What: /sys/class/power_supply/max8971-charger/top_off_timer
856+
Date: May 2025
857+
KernelVersion: 6.15.0
858+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
859+
Description:
860+
This entry shows and sets the maximum time the max8971
861+
charger operates in top-off charge mode. When the timer expires
862+
the device will terminate top-off charge mode (charging current
863+
will drop to 0 A) and will trigger interrupt.
864+
865+
Valid values:
866+
867+
- 0 - 70 (minutes), step by 10 (rounded down)

drivers/power/supply/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,20 @@ config CHARGER_MAX77976
617617
This driver can also be built as a module. If so, the module will be
618618
called max77976_charger.
619619

620+
config CHARGER_MAX8971
621+
tristate "Maxim MAX8971 battery charger driver"
622+
depends on I2C
623+
select REGMAP_I2C
624+
help
625+
The MAX8971 is a compact, high-frequency, high-efficiency switch-mode
626+
charger for a one-cell lithium-ion (Li+) battery. It delivers up to
627+
1.55A of current to the battery from inputs up to 7.5V and withstands
628+
transient inputs up to 22V.
629+
630+
Say Y to enable support for the Maxim MAX8971 battery charger.
631+
This driver can also be built as a module. If so, the module will be
632+
called max8971_charger.
633+
620634
config CHARGER_MAX8997
621635
tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver"
622636
depends on MFD_MAX8997 && REGULATOR_MAX8997

drivers/power/supply/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ obj-$(CONFIG_CHARGER_MAX77650) += max77650-charger.o
8383
obj-$(CONFIG_CHARGER_MAX77693) += max77693_charger.o
8484
obj-$(CONFIG_CHARGER_MAX77705) += max77705_charger.o
8585
obj-$(CONFIG_CHARGER_MAX77976) += max77976_charger.o
86+
obj-$(CONFIG_CHARGER_MAX8971) += max8971_charger.o
8687
obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o
8788
obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o
8889
obj-$(CONFIG_CHARGER_MP2629) += mp2629_charger.o

0 commit comments

Comments
 (0)