Skip to content

Commit

Permalink
platform/surface: aggregator: Add dedicated bus and device type
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
  • Loading branch information
qzed authored and jwrdegoede committed Jan 6, 2021
1 parent 02be44f commit eb0e90a
Show file tree
Hide file tree
Showing 9 changed files with 942 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/platform/surface/aggregator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ menuconfig SURFACE_AGGREGATOR
module, y if you want to build it into the kernel and n if you don't
want it at all.

config SURFACE_AGGREGATOR_BUS
bool "Surface System Aggregator Module Bus"
depends on SURFACE_AGGREGATOR
default y
help
Expands the Surface System Aggregator Module (SSAM) core driver by
providing a dedicated bus and client-device type.

This bus and device type are intended to provide and simplify support
for non-platform and non-ACPI SSAM devices, i.e. SSAM devices that are
not auto-detectable via the conventional means (e.g. ACPI).

config SURFACE_AGGREGATOR_ERROR_INJECTION
bool "Surface System Aggregator Module Error Injection Capabilities"
depends on SURFACE_AGGREGATOR
Expand Down
4 changes: 4 additions & 0 deletions drivers/platform/surface/aggregator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ surface_aggregator-objs += ssh_parser.o
surface_aggregator-objs += ssh_packet_layer.o
surface_aggregator-objs += ssh_request_layer.o
surface_aggregator-objs += controller.o

ifeq ($(CONFIG_SURFACE_AGGREGATOR_BUS),y)
surface_aggregator-objs += bus.o
endif
Loading

0 comments on commit eb0e90a

Please sign in to comment.