power: supply: Add battery driver for Surface Aggregator Module
authorMaximilian Luz <luzmaximilian@gmail.com>
Mon, 5 Apr 2021 23:41:25 +0000 (01:41 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 8 Apr 2021 12:30:28 +0000 (14:30 +0200)
commit167f77f7d0b3891941866ae66f9cf4362ec33f93
tree1528eeea3c7d6d511eb2e701036d5b17ea21dbcd
parentb6dc03fafe63e0e76c094e4303e6d43bc29a06d7
power: supply: Add battery driver for Surface Aggregator Module

On newer Microsoft Surface models (specifically 7th-generation, i.e.
Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go),
battery and AC status/information is no longer handled via standard ACPI
devices, but instead directly via the Surface System Aggregator Module
(SSAM), i.e. the embedded controller on those devices.

While on previous generation models, battery status is also handled via
SSAM, an ACPI shim was present to translate the standard ACPI battery
interface to SSAM requests. The SSAM interface itself, which is modeled
closely after the ACPI interface, has not changed.

This commit introduces a new SSAM client device driver to support
battery status/information via the aforementioned interface on said
Surface models. It is in parts based on the standard ACPI battery
driver.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/ABI/testing/sysfs-class-power-surface [new file with mode: 0644]
MAINTAINERS
drivers/power/supply/Kconfig
drivers/power/supply/Makefile
drivers/power/supply/surface_battery.c [new file with mode: 0644]