From b1f81b496b0d14382a9cf160cc4dbdefb233f936 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sat, 21 Mar 2020 15:22:22 +0000 Subject: platform/x86: surface3_power: MSHW0011 rev-eng implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/acpica/acpica/commit/9159c09a2a5897a43f78c95cdffc160d399722c3 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 Signed-off-by: Benjamin Tissoires Signed-off-by: Stephen Just Signed-off-by: Andy Shevchenko --- drivers/platform/x86/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/platform/x86/Makefile') diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index 2ecd08783a73..53408d965874 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -82,6 +82,7 @@ obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o # Microsoft obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o obj-$(CONFIG_SURFACE_3_BUTTON) += surface3_button.o +obj-$(CONFIG_SURFACE_3_POWER_OPREGION) += surface3_power.o obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o # MSI -- cgit v1.2.3