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