Commit c6ed48ef authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Tzung-Bi Shih

power: supply: add ChromeOS EC based charge control driver

The ChromeOS Embedded Controller implements a command to control charge
thresholds and behaviour.

Use it to implement the standard Linux charge_control_start_threshold,
charge_control_end_threshold and charge_behaviour sysfs UAPIs.

The driver is designed to be probed via the cros_ec mfd device.
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-4-8f649d018c52@weissschuh.netSigned-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 69a13742
......@@ -5135,6 +5135,11 @@ S: Maintained
F: Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
F: sound/soc/codecs/cros_ec_codec.*
CHROMEOS EC CHARGE CONTROL
M: Thomas Weißschuh <thomas@weissschuh.net>
S: Maintained
F: drivers/power/supply/cros_charge-control.c
CHROMEOS EC HARDWARE MONITORING
M: Thomas Weißschuh <thomas@weissschuh.net>
L: chrome-platform@lists.linux.dev
......@@ -5148,6 +5153,7 @@ M: Benson Leung <bleung@chromium.org>
R: Guenter Roeck <groeck@chromium.org>
L: chrome-platform@lists.linux.dev
S: Maintained
F: drivers/power/supply/cros_charge-control.c
F: drivers/power/supply/cros_usbpd-charger.c
N: cros_ec
N: cros-ec
......
......@@ -860,6 +860,18 @@ config CHARGER_CROS_PCHG
the peripheral charge ports from the EC and converts that into
power_supply properties.
config CHARGER_CROS_CONTROL
tristate "ChromeOS EC based charge control"
depends on MFD_CROS_EC_DEV
depends on ACPI_BATTERY
default MFD_CROS_EC_DEV
help
Say Y here to enable ChromeOS EC based battery charge control.
This driver can manage charge thresholds and behaviour.
This driver can also be built as a module. If so, the module will be
called cros_charge-control.
config CHARGER_SC2731
tristate "Spreadtrum SC2731 charger driver"
depends on MFD_SC27XX_PMIC || COMPILE_TEST
......
......@@ -100,6 +100,7 @@ obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
obj-$(CONFIG_AXP288_CHARGER) += axp288_charger.o
obj-$(CONFIG_CHARGER_CROS_CONTROL) += cros_charge-control.o
obj-$(CONFIG_CHARGER_CROS_USBPD) += cros_usbpd-charger.o
obj-$(CONFIG_CHARGER_CROS_PCHG) += cros_peripheral_charger.o
obj-$(CONFIG_CHARGER_SC2731) += sc2731_charger.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment