xref: /openbmc/linux/drivers/platform/surface/Kconfig (revision 9f794056)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Microsoft Surface Platform-Specific Drivers
4#
5
6menuconfig SURFACE_PLATFORMS
7	bool "Microsoft Surface Platform-Specific Device Drivers"
8	depends on ARM64 || X86 || COMPILE_TEST
9	default y
10	help
11	  Say Y here to get to see options for platform-specific device drivers
12	  for Microsoft Surface devices. This option alone does not add any
13	  kernel code.
14
15	  If you say N, all options in this submenu will be skipped and disabled.
16
17if SURFACE_PLATFORMS
18
19config SURFACE3_WMI
20	tristate "Surface 3 WMI Driver"
21	depends on ACPI_WMI
22	depends on DMI
23	depends on INPUT
24	depends on SPI
25	help
26	  Say Y here if you have a Surface 3.
27
28	  To compile this driver as a module, choose M here: the module will
29	  be called surface3-wmi.
30
31config SURFACE_3_POWER_OPREGION
32	tristate "Surface 3 battery platform operation region support"
33	depends on ACPI
34	depends on I2C
35	help
36	  This driver provides support for ACPI operation
37	  region of the Surface 3 battery platform driver.
38
39config SURFACE_ACPI_NOTIFY
40	tristate "Surface ACPI Notify Driver"
41	depends on SURFACE_AGGREGATOR
42	help
43	  Surface ACPI Notify (SAN) driver for Microsoft Surface devices.
44
45	  This driver provides support for the ACPI interface (called SAN) of
46	  the Surface System Aggregator Module (SSAM) EC. This interface is used
47	  on 5th- and 6th-generation Microsoft Surface devices (including
48	  Surface Pro 5 and 6, Surface Book 2, Surface Laptops 1 and 2, and in
49	  reduced functionality on the Surface Laptop 3) to execute SSAM
50	  requests directly from ACPI code, as well as receive SSAM events and
51	  turn them into ACPI notifications. It essentially acts as a
52	  translation layer between the SSAM controller and ACPI.
53
54	  Specifically, this driver may be needed for battery status reporting,
55	  thermal sensor access, and real-time clock information, depending on
56	  the Surface device in question.
57
58config SURFACE_AGGREGATOR_CDEV
59	tristate "Surface System Aggregator Module User-Space Interface"
60	depends on SURFACE_AGGREGATOR
61	help
62	  Provides a misc-device interface to the Surface System Aggregator
63	  Module (SSAM) controller.
64
65	  This option provides a module (called surface_aggregator_cdev), that,
66	  when loaded, will add a client device (and its respective driver) to
67	  the SSAM controller. Said client device manages a misc-device
68	  interface (/dev/surface/aggregator), which can be used by user-space
69	  tools to directly communicate with the SSAM EC by sending requests and
70	  receiving the corresponding responses.
71
72	  The provided interface is intended for debugging and development only,
73	  and should not be used otherwise.
74
75config SURFACE_AGGREGATOR_REGISTRY
76	tristate "Surface System Aggregator Module Device Registry"
77	depends on SURFACE_AGGREGATOR
78	depends on SURFACE_AGGREGATOR_BUS
79	help
80	  Device-registry and device-hubs for Surface System Aggregator Module
81	  (SSAM) devices.
82
83	  Provides a module and driver which act as a device-registry for SSAM
84	  client devices that cannot be detected automatically, e.g. via ACPI.
85	  Such devices are instead provided via this registry and attached via
86	  device hubs, also provided in this module.
87
88	  Devices provided via this registry are:
89	  - Platform profile (performance-/cooling-mode) device (5th- and later
90	    generations).
91	  - Battery/AC devices (7th-generation).
92	  - HID input devices (7th-generation).
93
94	  Select M (recommended) or Y here if you want support for the above
95	  mentioned devices on the corresponding Surface models. Without this
96	  module, the respective devices will not be instantiated and thus any
97	  functionality provided by them will be missing, even when drivers for
98	  these devices are present. In other words, this module only provides
99	  the respective client devices. Drivers for these devices still need to
100	  be selected via the other options.
101
102config SURFACE_AGGREGATOR_TABLET_SWITCH
103	tristate "Surface Aggregator Generic Tablet-Mode Switch Driver"
104	depends on SURFACE_AGGREGATOR
105	depends on SURFACE_AGGREGATOR_BUS
106	depends on INPUT
107	help
108	  Provides a tablet-mode switch input device on Microsoft Surface models
109	  using the KIP subsystem for detachable keyboards (e.g. keyboard covers)
110	  or the POS subsystem for device/screen posture changes.
111
112	  The KIP subsystem is used on newer Surface generations to handle
113	  detachable input peripherals, specifically the keyboard cover (containing
114	  keyboard and touchpad) on the Surface Pro 8 and Surface Pro X. The POS
115	  subsystem is used for device posture change notifications on the Surface
116	  Laptop Studio. This module provides a driver to let user-space know when
117	  the device should be considered in tablet-mode due to the keyboard cover
118	  being detached or folded back (essentially signaling when the keyboard is
119	  not available for input). It does so by creating a tablet-mode switch
120	  input device, sending the standard SW_TABLET_MODE event on mode change.
121
122	  Select M or Y here, if you want to provide tablet-mode switch input
123	  events on the Surface Pro 8, Surface Pro X, and Surface Laptop Studio.
124
125config SURFACE_DTX
126	tristate "Surface DTX (Detachment System) Driver"
127	depends on SURFACE_AGGREGATOR
128	depends on INPUT
129	help
130	  Driver for the Surface Book clipboard detachment system (DTX).
131
132	  On the Surface Book series devices, the display part containing the
133	  CPU (called the clipboard) can be detached from the base (containing a
134	  battery, the keyboard, and, optionally, a discrete GPU) by (if
135	  necessary) unlocking and opening the latch connecting both parts.
136
137	  This driver provides a user-space interface that can influence the
138	  behavior of this process, which includes the option to abort it in
139	  case the base is still in use or speed it up in case it is not.
140
141	  Note that this module can be built without support for the Surface
142	  Aggregator Bus (i.e. CONFIG_SURFACE_AGGREGATOR_BUS=n). In that case,
143	  some devices, specifically the Surface Book 3, will not be supported.
144
145config SURFACE_GPE
146	tristate "Surface GPE/Lid Support Driver"
147	depends on ACPI
148	depends on DMI
149	help
150	  This driver marks the GPEs related to the ACPI lid device found on
151	  Microsoft Surface devices as wakeup sources and prepares them
152	  accordingly. It is required on those devices to allow wake-ups from
153	  suspend by opening the lid.
154
155config SURFACE_HOTPLUG
156	tristate "Surface Hot-Plug Driver"
157	depends on ACPI
158	depends on GPIOLIB
159	help
160	  Driver for out-of-band hot-plug event signaling on Microsoft Surface
161	  devices with hot-pluggable PCIe cards.
162
163	  This driver is used on Surface Book (2 and 3) devices with a
164	  hot-pluggable discrete GPU (dGPU). When not in use, the dGPU on those
165	  devices can enter D3cold, which prevents in-band (standard) PCIe
166	  hot-plug signaling. Thus, without this driver, detaching the base
167	  containing the dGPU will not correctly update the state of the
168	  corresponding PCIe device if it is in D3cold. This driver adds support
169	  for out-of-band hot-plug notifications, ensuring that the device state
170	  is properly updated even when the device in question is in D3cold.
171
172	  Select M or Y here, if you want to (fully) support hot-plugging of
173	  dGPU devices on the Surface Book 2 and/or 3 during D3cold.
174
175config SURFACE_PLATFORM_PROFILE
176	tristate "Surface Platform Profile Driver"
177	depends on ACPI
178	depends on SURFACE_AGGREGATOR_REGISTRY
179	select ACPI_PLATFORM_PROFILE
180	help
181	  Provides support for the ACPI platform profile on 5th- and later
182	  generation Microsoft Surface devices.
183
184	  More specifically, this driver provides ACPI platform profile support
185	  on Microsoft Surface devices with a Surface System Aggregator Module
186	  (SSAM) connected via the Surface Serial Hub (SSH / SAM-over-SSH). In
187	  other words, this driver provides platform profile support on the
188	  Surface Pro 5, Surface Book 2, Surface Laptop, Surface Laptop Go and
189	  later. On those devices, the platform profile can significantly
190	  influence cooling behavior, e.g. setting it to 'quiet' (default) or
191	  'low-power' can significantly limit performance of the discrete GPU on
192	  Surface Books, while in turn leading to lower power consumption and/or
193	  less fan noise.
194
195	  Select M or Y here, if you want to include ACPI platform profile
196	  support on the above mentioned devices.
197
198config SURFACE_PRO3_BUTTON
199	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
200	depends on ACPI
201	depends on INPUT
202	help
203	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
204
205source "drivers/platform/surface/aggregator/Kconfig"
206
207endif # SURFACE_PLATFORMS
208