Skip to content

Commit eb0e90a

Browse files
qzedjwrdegoede
authored andcommitted
platform/surface: aggregator: Add dedicated bus and device type
The Surface Aggregator EC provides varying functionality, depending on the Surface device. To manage this functionality, we use dedicated client devices for each subsystem or virtual device of the EC. While some of these clients are described as standard devices in ACPI and the corresponding client drivers can be implemented as platform drivers in the kernel (making use of the controller API already present), many devices, especially on newer Surface models, cannot be found there. To simplify management of these devices, we introduce a new bus and client device type for the Surface Aggregator subsystem. The new device type takes care of managing the controller reference, essentially guaranteeing its validity for as long as the client device exists, thus alleviating the need to manually establish device links for that purpose in the client driver (as has to be done with the platform devices). Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201221183959.1186143-7-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 02be44f commit eb0e90a

9 files changed

Lines changed: 942 additions & 0 deletions

File tree

‎drivers/platform/surface/aggregator/Kconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ menuconfig SURFACE_AGGREGATOR
4141
module, y if you want to build it into the kernel and n if you don't
4242
want it at all.
4343

44+
config SURFACE_AGGREGATOR_BUS
45+
bool "Surface System Aggregator Module Bus"
46+
depends on SURFACE_AGGREGATOR
47+
default y
48+
help
49+
Expands the Surface System Aggregator Module (SSAM) core driver by
50+
providing a dedicated bus and client-device type.
51+
52+
This bus and device type are intended to provide and simplify support
53+
for non-platform and non-ACPI SSAM devices, i.e. SSAM devices that are
54+
not auto-detectable via the conventional means (e.g. ACPI).
55+
4456
config SURFACE_AGGREGATOR_ERROR_INJECTION
4557
bool "Surface System Aggregator Module Error Injection Capabilities"
4658
depends on SURFACE_AGGREGATOR

‎drivers/platform/surface/aggregator/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ surface_aggregator-objs += ssh_parser.o
1111
surface_aggregator-objs += ssh_packet_layer.o
1212
surface_aggregator-objs += ssh_request_layer.o
1313
surface_aggregator-objs += controller.o
14+
15+
ifeq ($(CONFIG_SURFACE_AGGREGATOR_BUS),y)
16+
surface_aggregator-objs += bus.o
17+
endif

0 commit comments

Comments
 (0)