Skip to content

Commit 1b062be

Browse files
committed
platform: Add gen5 MS Surface platform support
Add platform/ACPI support for 5th generation Microsoft Surface devices. This provides support for the embedded controller on those devices, required for battery-status and thermal events, as well as keyboard support for Surface Laptop devices and proper detachment handling for the Surface Book 2 clipboard.
1 parent 6a3fb10 commit 1b062be

3 files changed

Lines changed: 4098 additions & 0 deletions

File tree

drivers/platform/x86/Kconfig

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,103 @@ config THINKPAD_ACPI_HOTKEY_POLL
573573
If you are not sure, say Y here. The driver enables polling only if
574574
it is strictly necessary to do so.
575575

576+
config SURFACE_ACPI
577+
depends on ACPI
578+
tristate "Microsoft Surface ACPI/Platform Drivers"
579+
---help---
580+
ACPI and platform drivers for Microsoft Surface devices.
581+
582+
config SURFACE_ACPI_SSH
583+
bool "Surface Serial Hub Driver"
584+
depends on SURFACE_ACPI
585+
depends on X86_INTEL_LPSS
586+
depends on SERIAL_8250_DW
587+
depends on SERIAL_8250_DMA
588+
depends on SERIAL_DEV_CTRL_TTYPORT
589+
select CRC_CCITT
590+
default y
591+
---help---
592+
Surface Serial Hub driver for 5th generation (or later) Microsoft
593+
Surface devices.
594+
595+
This is the base driver for the embedded serial controller found on
596+
5th generation (and later) Microsoft Surface devices (e.g. Book 2,
597+
Laptop, Laptop 2, Pro 2017, Pro 6, ...). This driver itself only
598+
provides access to the embedded controller and subsequent drivers are
599+
required for the respective functionalities.
600+
601+
If you have a 5th generation (or later) Microsoft Surface device, say
602+
Y or M here.
603+
604+
config SURFACE_ACPI_SSH_DEBUG_DEVICE
605+
bool "Surface Serial Hub Debug Device"
606+
depends on SURFACE_ACPI_SSH
607+
default n
608+
---help---
609+
Debug device for direct communication with the embedded controller
610+
found on 5th generation (and later) Microsoft Surface devices (e.g.
611+
Book 2, Laptop, Laptop 2, Pro 2017, Pro 6, ...) via sysfs.
612+
613+
If you are not sure, say N here.
614+
615+
config SURFACE_ACPI_SAN
616+
bool "Surface ACPI Notify Driver"
617+
depends on SURFACE_ACPI_SSH
618+
default y
619+
---help---
620+
Surface ACPI Notify driver for 5th generation (or later) Microsoft
621+
Surface devices.
622+
623+
This driver enables basic ACPI events and requests, such as battery
624+
status requests/events, thermal events, lid status, and possibly more,
625+
which would otherwise not work on these devices.
626+
627+
If you are not sure, say Y here.
628+
629+
config SURFACE_ACPI_VHF
630+
bool "Surface Virtual HID Framework Driver"
631+
depends on SURFACE_ACPI_SSH
632+
depends on HID
633+
default y
634+
---help---
635+
Surface Virtual HID Framework driver for 5th generation (or later)
636+
Microsoft Surface devices.
637+
638+
This driver provides support for the Microsoft Virtual HID framework,
639+
which is required for the Surface Laptop (1 and newer) keyboard.
640+
641+
If you are not sure, say Y here.
642+
643+
config SURFACE_ACPI_DTX
644+
bool "Surface Detachment System (DTX) Driver"
645+
depends on SURFACE_ACPI_SSH
646+
depends on INPUT
647+
default y
648+
---help---
649+
Surface Detachment System (DTX) driver for the Microsoft Surface Book
650+
2. This driver provides support for proper detachment handling in
651+
user-space, status-events relating to the base and support for
652+
the safe-guard keeping the base attached when the discrete GPU
653+
contained in it is running via the special /dev/surface-dtx device.
654+
655+
Also provides a standard input device to provide SW_TABLET_MODE events
656+
upon device mode change.
657+
658+
If you are not sure, say Y here.
659+
660+
config SURFACE_ACPI_SID
661+
bool "Surface Platform Integration Driver"
662+
depends on SURFACE_ACPI_SSH
663+
default y
664+
---help---
665+
Surface Platform Integration Driver for the Microsoft Surface Devices.
666+
Currently only supports the Surface Book 2. This driver provides suport
667+
for setting performance-modes via the perf_mode sysfs attribute.
668+
Performance-modes directly influence the fan-profile of the device,
669+
allowing to choose between higher performance or quieter operation.
670+
671+
If you are not sure, say Y here.
672+
576673
config SENSORS_HDAPS
577674
tristate "Thinkpad Hard Drive Active Protection System (hdaps)"
578675
depends on INPUT

drivers/platform/x86/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
3535
obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
3636
obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
3737
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
38+
obj-$(CONFIG_SURFACE_ACPI) += surface_acpi.o
3839
obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
3940
obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o
4041
obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o

0 commit comments

Comments
 (0)