Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max77779-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX77779 battery charger

maintainers:
- W4HO <87742609+W4HO-ham@users.noreply.github.com>

description:
The switching charger of the Maxim MAX77779 power management IC, on the
same I2C bus as its fuel gauge. It charges the battery from USB and
powers the system from it. The MAX77779's charger, fuel gauge and Type-C
controller answer at their own I2C addresses with their own register
maps, so each is described as its own I2C device rather than as a cell
of one multi-function device.

allOf:
- $ref: power-supply.yaml#

properties:
compatible:
const: maxim,max77779-charger

reg:
maxItems: 1

interrupts:
maxItems: 1
description: The charger's interrupt, through the PMIC's interrupt
controller.

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;

charger: charger@69 {
compatible = "maxim,max77779-charger";
reg = <0x69>;
};

fuel-gauge@36 {
compatible = "maxim,max77779-fg";
reg = <0x36>;
shunt-resistor-micro-ohms = <2000>;
power-supplies = <&charger>;
};
};
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -16190,12 +16190,14 @@ L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/power/supply/max77759_charger.c

MAXIM MAX77779 FUEL GAUGE DRIVER
MAXIM MAX77779 FUEL GAUGE AND CHARGER DRIVERS
M: W4HO <87742609+W4HO-ham@users.noreply.github.com>
L: linux-pm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/power/supply/maxim,max77779-charger.yaml
F: Documentation/devicetree/bindings/power/supply/maxim,max77779-fg.yaml
F: drivers/power/supply/max77779_battery.c
F: drivers/power/supply/max77779_charger.c

MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER
M: Javier Martinez Canillas <javier@dowhile0.org>
Expand Down
14 changes: 14 additions & 0 deletions drivers/power/supply/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,20 @@ config BATTERY_MAX77779

The module is named max77779_battery.

config CHARGER_MAX77779
tristate "Maxim MAX77779 battery charger"
depends on I2C
depends on OF
select REGMAP_I2C
help
Say Y or M here to report the state of the charger in the Maxim
MAX77779 power management IC, found in the Google Pixel 9a, and
to let userspace stop and restart charging. The charger keeps
its own (OTP) charge current and voltage; the driver only reads
them.

The module is named max77779_charger.

config BATTERY_MAX1720X
tristate "Maxim MAX17201/MAX17205 Fuel Gauge"
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 @@ -59,6 +59,7 @@ obj-$(CONFIG_BATTERY_DA9150) += da9150-fg.o
obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o
obj-$(CONFIG_BATTERY_MAX17042) += max17042_battery.o
obj-$(CONFIG_BATTERY_MAX77779) += max77779_battery.o
obj-$(CONFIG_CHARGER_MAX77779) += max77779_charger.o
obj-$(CONFIG_BATTERY_MAX1720X) += max1720x_battery.o
obj-$(CONFIG_BATTERY_MAX1721X) += max1721x_battery.o
obj-$(CONFIG_BATTERY_RT5033) += rt5033_battery.o
Expand Down
Loading