xref: /linux/drivers/platform/surface/aggregator/Kconfig (revision 06d07429858317ded2db7986113a9e0129cd599b)
1c167b9c7SMaximilian Luz# SPDX-License-Identifier: GPL-2.0+
2221756e6SMaximilian Luz# Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
3c167b9c7SMaximilian Luz
4c167b9c7SMaximilian Luzmenuconfig SURFACE_AGGREGATOR
5c167b9c7SMaximilian Luz	tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
6c167b9c7SMaximilian Luz	depends on SERIAL_DEV_BUS
77f2e2045SSunil V L	depends on ACPI && !RISCV
8*90ca2251SMathis Marion	select CRC_ITU_T
9c167b9c7SMaximilian Luz	help
10c167b9c7SMaximilian Luz	  The Surface System Aggregator Module (Surface SAM or SSAM) is an
11c167b9c7SMaximilian Luz	  embedded controller (EC) found on 5th- and later-generation Microsoft
12c167b9c7SMaximilian Luz	  Surface devices (i.e. Surface Pro 5, Surface Book 2, Surface Laptop,
13c167b9c7SMaximilian Luz	  and newer, with exception of Surface Go series devices).
14c167b9c7SMaximilian Luz
15c167b9c7SMaximilian Luz	  Depending on the device in question, this EC provides varying
16c167b9c7SMaximilian Luz	  functionality, including:
17c167b9c7SMaximilian Luz	  - EC access from ACPI via Surface ACPI Notify (5th- and 6th-generation)
18c167b9c7SMaximilian Luz	  - battery status information (all devices)
19c167b9c7SMaximilian Luz	  - thermal sensor access (all devices)
20c167b9c7SMaximilian Luz	  - performance mode / cooling mode control (all devices)
21c167b9c7SMaximilian Luz	  - clipboard detachment system control (Surface Book 2 and 3)
22c167b9c7SMaximilian Luz	  - HID / keyboard input (Surface Laptops, Surface Book 3)
23c167b9c7SMaximilian Luz
24c167b9c7SMaximilian Luz	  This option controls whether the Surface SAM subsystem core will be
25c167b9c7SMaximilian Luz	  built. This includes a driver for the Surface Serial Hub (SSH), which
26c167b9c7SMaximilian Luz	  is the device responsible for the communication with the EC, and a
27c167b9c7SMaximilian Luz	  basic kernel interface exposing the EC functionality to other client
28c167b9c7SMaximilian Luz	  drivers, i.e. allowing them to make requests to the EC and receive
29c167b9c7SMaximilian Luz	  events from it. Selecting this option alone will not provide any
30c167b9c7SMaximilian Luz	  client drivers and therefore no functionality beyond the in-kernel
31c167b9c7SMaximilian Luz	  interface. Said functionality is the responsibility of the respective
32c167b9c7SMaximilian Luz	  client drivers.
33c167b9c7SMaximilian Luz
34c167b9c7SMaximilian Luz	  Note: While 4th-generation Surface devices also make use of a SAM EC,
35c167b9c7SMaximilian Luz	  due to a difference in the communication interface of the controller,
36c167b9c7SMaximilian Luz	  only 5th and later generations are currently supported. Specifically,
37c167b9c7SMaximilian Luz	  devices using SAM-over-SSH are supported, whereas devices using
38c167b9c7SMaximilian Luz	  SAM-over-HID, which is used on the 4th generation, are currently not
39c167b9c7SMaximilian Luz	  supported.
40c167b9c7SMaximilian Luz
41c167b9c7SMaximilian Luz	  Choose m if you want to build the SAM subsystem core and SSH driver as
42c167b9c7SMaximilian Luz	  module, y if you want to build it into the kernel and n if you don't
43c167b9c7SMaximilian Luz	  want it at all.
4402be44f6SMaximilian Luz
45eb0e90a8SMaximilian Luzconfig SURFACE_AGGREGATOR_BUS
46eb0e90a8SMaximilian Luz	bool "Surface System Aggregator Module Bus"
47eb0e90a8SMaximilian Luz	depends on SURFACE_AGGREGATOR
48eb0e90a8SMaximilian Luz	default y
49eb0e90a8SMaximilian Luz	help
50eb0e90a8SMaximilian Luz	  Expands the Surface System Aggregator Module (SSAM) core driver by
51eb0e90a8SMaximilian Luz	  providing a dedicated bus and client-device type.
52eb0e90a8SMaximilian Luz
53eb0e90a8SMaximilian Luz	  This bus and device type are intended to provide and simplify support
54eb0e90a8SMaximilian Luz	  for non-platform and non-ACPI SSAM devices, i.e. SSAM devices that are
55eb0e90a8SMaximilian Luz	  not auto-detectable via the conventional means (e.g. ACPI).
56eb0e90a8SMaximilian Luz
5702be44f6SMaximilian Luzconfig SURFACE_AGGREGATOR_ERROR_INJECTION
5802be44f6SMaximilian Luz	bool "Surface System Aggregator Module Error Injection Capabilities"
5902be44f6SMaximilian Luz	depends on SURFACE_AGGREGATOR
6002be44f6SMaximilian Luz	depends on FUNCTION_ERROR_INJECTION
6102be44f6SMaximilian Luz	help
6202be44f6SMaximilian Luz	  Provides error-injection capabilities for the Surface System
6302be44f6SMaximilian Luz	  Aggregator Module subsystem and Surface Serial Hub driver.
6402be44f6SMaximilian Luz
6502be44f6SMaximilian Luz	  Specifically, exports error injection hooks to be used with the
6602be44f6SMaximilian Luz	  kernel's function error injection capabilities to simulate underlying
6702be44f6SMaximilian Luz	  transport and communication problems, such as invalid data sent to or
6802be44f6SMaximilian Luz	  received from the EC, dropped data, and communication timeouts.
6902be44f6SMaximilian Luz	  Intended for development and debugging.
70