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