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