OSDN Git Service

platform/x86: surface3_power: MSHW0011 rev-eng implementation
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 31 Aug 2018 15:18:28 +0000 (17:18 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Oct 2018 03:02:37 +0000 (11:02 +0800)
commit99bbd425c30567e24fcb4cbbd1c9403b20ddd447
tree3d29bb2fd77149cf9de7ef9a5a47b6cbffe0513c
parentc2de990b50aefddf1a185244a8d38c551b3b5abc
platform/x86: surface3_power: MSHW0011 rev-eng implementation

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: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Stephen Just <stephenjust@gmail.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/surface3_power.c [new file with mode: 0644]