0001 # SPDX-License-Identifier: GPL-2.0+
0002 # Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
0003
0004 menuconfig SURFACE_AGGREGATOR
0005 tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
0006 depends on SERIAL_DEV_BUS
0007 depends on ACPI
0008 select CRC_CCITT
0009 help
0010 The Surface System Aggregator Module (Surface SAM or SSAM) is an
0011 embedded controller (EC) found on 5th- and later-generation Microsoft
0012 Surface devices (i.e. Surface Pro 5, Surface Book 2, Surface Laptop,
0013 and newer, with exception of Surface Go series devices).
0014
0015 Depending on the device in question, this EC provides varying
0016 functionality, including:
0017 - EC access from ACPI via Surface ACPI Notify (5th- and 6th-generation)
0018 - battery status information (all devices)
0019 - thermal sensor access (all devices)
0020 - performance mode / cooling mode control (all devices)
0021 - clipboard detachment system control (Surface Book 2 and 3)
0022 - HID / keyboard input (Surface Laptops, Surface Book 3)
0023
0024 This option controls whether the Surface SAM subsystem core will be
0025 built. This includes a driver for the Surface Serial Hub (SSH), which
0026 is the device responsible for the communication with the EC, and a
0027 basic kernel interface exposing the EC functionality to other client
0028 drivers, i.e. allowing them to make requests to the EC and receive
0029 events from it. Selecting this option alone will not provide any
0030 client drivers and therefore no functionality beyond the in-kernel
0031 interface. Said functionality is the responsibility of the respective
0032 client drivers.
0033
0034 Note: While 4th-generation Surface devices also make use of a SAM EC,
0035 due to a difference in the communication interface of the controller,
0036 only 5th and later generations are currently supported. Specifically,
0037 devices using SAM-over-SSH are supported, whereas devices using
0038 SAM-over-HID, which is used on the 4th generation, are currently not
0039 supported.
0040
0041 Choose m if you want to build the SAM subsystem core and SSH driver as
0042 module, y if you want to build it into the kernel and n if you don't
0043 want it at all.
0044
0045 config SURFACE_AGGREGATOR_BUS
0046 bool "Surface System Aggregator Module Bus"
0047 depends on SURFACE_AGGREGATOR
0048 default y
0049 help
0050 Expands the Surface System Aggregator Module (SSAM) core driver by
0051 providing a dedicated bus and client-device type.
0052
0053 This bus and device type are intended to provide and simplify support
0054 for non-platform and non-ACPI SSAM devices, i.e. SSAM devices that are
0055 not auto-detectable via the conventional means (e.g. ACPI).
0056
0057 config SURFACE_AGGREGATOR_ERROR_INJECTION
0058 bool "Surface System Aggregator Module Error Injection Capabilities"
0059 depends on SURFACE_AGGREGATOR
0060 depends on FUNCTION_ERROR_INJECTION
0061 help
0062 Provides error-injection capabilities for the Surface System
0063 Aggregator Module subsystem and Surface Serial Hub driver.
0064
0065 Specifically, exports error injection hooks to be used with the
0066 kernel's function error injection capabilities to simulate underlying
0067 transport and communication problems, such as invalid data sent to or
0068 received from the EC, dropped data, and communication timeouts.
0069 Intended for development and debugging.