Skip to content

Commit b1f81b4

Browse files
archseerandy-shev
authored andcommitted
platform/x86: surface3_power: MSHW0011 rev-eng implementation
Patch was rebased on top of for-next. Thanks for your patience! Blaž I'm resubmitting this patch with review feedback addressed: https://patchwork.kernel.org/patch/10584079/ The patch was previously not resubmitted because it required a change that was reverted in the ACPICA. That has since been corrected: acpica/acpica@9159c09 We've been using this patch for a while and user reports confirm that it works: https://github.com/linux-surface/linux-surface Previous description follows. >8------------------------------------------------------8< The MSHW0011 device is a chip that replaces the battery firmware by using ACPI operation regions on the Surface 3. It is unclear whether or not the chip will be reused somewhere else (under Windows, the chip is called "Surface Platform Power Driver" and the driver is provided by Microsoft). The values have been obtained by reverse engineering, and are subject to errors. Looks like it works on overall pretty well. I couldn't manage to get the IRQ correctly triggered, so I am using a good old polling thread to check for changes. This is something to be fixed in a later version. Link: https://bugzilla.kernel.org/show_bug.cgi?id=106231 Signed-off-by: Blaž Hrastnik <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Stephen Just <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent c61b693 commit b1f81b4

File tree

3 files changed

+606
-0
lines changed

3 files changed

+606
-0
lines changed

drivers/platform/x86/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,13 @@ config SURFACE_PRO3_BUTTON
861861
---help---
862862
This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
863863

864+
config SURFACE_3_POWER_OPREGION
865+
tristate "Surface 3 battery platform operation region support"
866+
depends on ACPI && I2C
867+
help
868+
This driver provides support for ACPI operation
869+
region of the Surface 3 battery platform driver.
870+
864871
config MSI_LAPTOP
865872
tristate "MSI Laptop Extras"
866873
depends on ACPI

drivers/platform/x86/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o
8282
# Microsoft
8383
obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o
8484
obj-$(CONFIG_SURFACE_3_BUTTON) += surface3_button.o
85+
obj-$(CONFIG_SURFACE_3_POWER_OPREGION) += surface3_power.o
8586
obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o
8687

8788
# MSI

0 commit comments

Comments
 (0)