Commit 167f77f7 authored by Maximilian Luz's avatar Maximilian Luz Committed by Sebastian Reichel

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: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent b6dc03fa
What: /sys/class/power_supply/<supply_name>/alarm
Date: April 2021
KernelVersion: 5.13
Contact: Maximilian Luz <luzmaximilian@gmail.com>
Description:
Battery trip point. When the remaining battery capacity crosses this
value in either direction, the system will be notified and if
necessary woken.
Set to zero to clear/disable.
Access: Read, Write
Valid values: In micro-Wh or micro-Ah, depending on the power unit
of the battery
...@@ -11861,6 +11861,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] ...@@ -11861,6 +11861,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch]
F: include/linux/cciss*.h F: include/linux/cciss*.h
F: include/uapi/linux/cciss*.h F: include/uapi/linux/cciss*.h
MICROSOFT SURFACE BATTERY AND AC DRIVERS
M: Maximilian Luz <luzmaximilian@gmail.com>
L: linux-pm@vger.kernel.org
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/power/supply/surface_battery.c
MICROSOFT SURFACE GPE LID SUPPORT DRIVER MICROSOFT SURFACE GPE LID SUPPORT DRIVER
M: Maximilian Luz <luzmaximilian@gmail.com> M: Maximilian Luz <luzmaximilian@gmail.com>
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org
......
...@@ -801,4 +801,20 @@ config BATTERY_ACER_A500 ...@@ -801,4 +801,20 @@ config BATTERY_ACER_A500
help help
Say Y to include support for Acer Iconia Tab A500 battery fuel gauge. Say Y to include support for Acer Iconia Tab A500 battery fuel gauge.
config BATTERY_SURFACE
tristate "Battery driver for 7th-generation Microsoft Surface devices"
depends on SURFACE_AGGREGATOR_REGISTRY
help
Driver for battery devices connected via/managed by the Surface System
Aggregator Module (SSAM).
This driver provides battery-information and -status support for
Surface devices where said data is not exposed via the standard ACPI
devices. On those models (7th-generation), battery-information is
instead handled directly via SSAM client devices and this driver.
Say M or Y here to include battery status support for 7th-generation
Microsoft Surface devices, i.e. Surface Pro 7, Surface Laptop 3,
Surface Book 3, and Surface Laptop Go.
endif # POWER_SUPPLY endif # POWER_SUPPLY
...@@ -101,3 +101,4 @@ obj-$(CONFIG_CHARGER_BD99954) += bd99954-charger.o ...@@ -101,3 +101,4 @@ obj-$(CONFIG_CHARGER_BD99954) += bd99954-charger.o
obj-$(CONFIG_CHARGER_WILCO) += wilco-charger.o obj-$(CONFIG_CHARGER_WILCO) += wilco-charger.o
obj-$(CONFIG_RN5T618_POWER) += rn5t618_power.o obj-$(CONFIG_RN5T618_POWER) += rn5t618_power.o
obj-$(CONFIG_BATTERY_ACER_A500) += acer_a500_battery.o obj-$(CONFIG_BATTERY_ACER_A500) += acer_a500_battery.o
obj-$(CONFIG_BATTERY_SURFACE) += surface_battery.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