Skip to content

Staging/max77840 device driver #2815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions drivers/power/supply/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,19 @@ config CHARGER_MAX77693
help
Say Y to enable support for the Maxim MAX77693 battery charger.

config CHARGER_MAX77840
tristate "Maxim Integrated MAX77840 Charger with Fuel Gauge"
depends on MFD_MAX77840
help
Say Y here to enable support for the Maxim Integrated MAX77840 charger
with integrated fuel gauge functionality. This driver provides support
for battery charging, battery capacity monitoring, and handles various
charger-related interrupts such as charging state changes or faults.

The MAX77840 communicates over the I2C bus and is typically part of a
PMIC used in portable devices. This driver interfaces with the Linux
power supply subsystem.

config CHARGER_MAX77976
tristate "Maxim MAX77976 battery charger driver"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/power/supply/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ obj-$(CONFIG_CHARGER_MAX14577) += max14577_charger.o
obj-$(CONFIG_CHARGER_DETECTOR_MAX14656) += max14656_charger_detector.o
obj-$(CONFIG_CHARGER_MAX77650) += max77650-charger.o
obj-$(CONFIG_CHARGER_MAX77693) += max77693_charger.o
obj-$(CONFIG_CHARGER_MAX77840) += max77840-charger.o max77840-charger-detect.o max77840-battery.o
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds three different drivers all as part of the supply subsystem? Can't we have just one driver?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MAX77840 is a single chip, it integrates multiple functional blocks — charger, regulator, and fuel gauge.
Therefore, if possible, I’d prefer to maintain the current structure.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MAX77840 is a single chip, it integrates multiple functional blocks — charger, regulator, and fuel gauge.
Therefore, if possible, I’d prefer to maintain the current structure.

Yes, but it is three drivers in the same subsystem... Anyways, if the maintainer accepts this, fine by me. But at least for this review add a driver per commit and not three drivers in one single commit.

obj-$(CONFIG_CHARGER_MAX77976) += max77976_charger.o
obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o
obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o
Expand Down
Loading