Re: [PATCH v6 2/2] power: supply: Add support for Maxim MAX8971 charger

From: Svyatoslav Ryhel
Date: Sat May 03 2025 - 10:11:25 EST


сб, 3 трав. 2025 р. о 09:07 Svyatoslav Ryhel <clamor95@xxxxxxxxx> пише:
>
> ср, 30 квіт. 2025 р. о 08:51 Svyatoslav Ryhel <clamor95@xxxxxxxxx> пише:
> >
> > 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@xxxxxxxxx>
> > ---
> > Documentation/ABI/testing/sysfs-class-power | 43 ++
> > drivers/power/supply/Kconfig | 14 +
> > drivers/power/supply/Makefile | 1 +
> > drivers/power/supply/max8971_charger.c | 752 ++++++++++++++++++++
> > 4 files changed, 810 insertions(+)
> > create mode 100644 drivers/power/supply/max8971_charger.c
> >
>
> ...
>
> > diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> > index 8dbd39afa43c..09fb123efe4f 100644
> > --- a/drivers/power/supply/Kconfig
> > +++ b/drivers/power/supply/Kconfig
> > @@ -595,6 +595,20 @@ config CHARGER_MAX77976
> > This driver can also be built as a module. If so, the module will be
> > called max77976_charger.
> >
> > +config CHARGER_MAX8971
> > + tristate "Maxim MAX8971 battery charger driver"
> > + depends on I2C
>
> Greetings, Sebastian!
>
> Kernel test robot caught an issue regards dependencies of this driver.
> Although, it was made in way that extcon is optional, unfortunately
> extcon framework is not. Extcon header does not provide inline
> versions of functions used here hence undefined references pop up. I
> suppose proper fix would be by adding depends on EXTCON. Would you
> amend this commit or should I send a v7?
>
> Thank you for all your efforts and sorry for inconvenience.
>
> Best regards,
> Svyatoslav R.
>

UPD: addressed by Arnd Bergmann here
https://lkml.org/lkml/2025/5/3/271


> > + select REGMAP_I2C
> > + help
> > + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode
> > + charger for a one-cell lithium-ion (Li+) battery. It delivers up to
> > + 1.55A of current to the battery from inputs up to 7.5V and withstands
> > + transient inputs up to 22V.
> > +
> > + Say Y to enable support for the Maxim MAX8971 battery charger.
> > + This driver can also be built as a module. If so, the module will be
> > + called max8971_charger.
> > +
> > config CHARGER_MAX8997
> > tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver"
> > depends on MFD_MAX8997 && REGULATOR_MAX8997
> ...