Skip to content

Commit

Permalink
platform/surface: aggregator: Move subsystem hub drivers to their own…
Browse files Browse the repository at this point in the history
… module

Split out subsystem device hub drivers into their own module. This
allows us to load the hub drivers separately from the registry, which
will help future DT/OF support.

While doing so, also remove a small bit of code duplication.

Signed-off-by: Maximilian Luz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
  • Loading branch information
qzed authored and jwrdegoede committed Jul 2, 2022
1 parent 4a4ab61 commit 993a9e2
Show file tree
Hide file tree
Showing 5 changed files with 410 additions and 374 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13253,6 +13253,12 @@ F: include/linux/surface_acpi_notify.h
F: include/linux/surface_aggregator/
F: include/uapi/linux/surface_aggregator/

MICROSOFT SURFACE SYSTEM AGGREGATOR HUB DRIVER
M: Maximilian Luz <[email protected]>
L: [email protected]
S: Maintained
F: drivers/platform/surface/surface_aggregator_hub.c

MICROTEK X6 SCANNER
M: Oliver Neukum <[email protected]>
S: Maintained
Expand Down
35 changes: 31 additions & 4 deletions drivers/platform/surface/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,45 @@ config SURFACE_AGGREGATOR_CDEV
The provided interface is intended for debugging and development only,
and should not be used otherwise.

config SURFACE_AGGREGATOR_HUB
tristate "Surface System Aggregator Module Subsystem Device Hubs"
depends on SURFACE_AGGREGATOR
depends on SURFACE_AGGREGATOR_BUS
help
Device-hub drivers for Surface System Aggregator Module (SSAM) subsystem
devices.

Provides subsystem hub drivers which manage client devices on various
SSAM subsystems. In some subsystems, notably the BAS subsystem managing
devices contained in the base of the Surface Book 3 and the KIP subsystem
managing type-cover devices in the Surface Pro 8 and Surface Pro X,
devices can be (hot-)removed. Hub devices and drivers are required to
manage these subdevices.

Devices managed via these hubs are:
- Battery/AC devices (Surface Book 3).
- HID input devices (7th-generation and later models with detachable
input devices).

Select M (recommended) or Y here if you want support for the above
mentioned devices on the corresponding Surface models. Without this
module, the respective devices mentioned above will not be instantiated
and thus any functionality provided by them will be missing, even when
drivers for these devices are present. This module only provides the
respective subsystem hubs. Both drivers and device specification (e.g.
via the Surface Aggregator Registry) for these devices still need to be
selected via other options.

config SURFACE_AGGREGATOR_REGISTRY
tristate "Surface System Aggregator Module Device Registry"
depends on SURFACE_AGGREGATOR
depends on SURFACE_AGGREGATOR_BUS
help
Device-registry and device-hubs for Surface System Aggregator Module
(SSAM) devices.
Device-registry for Surface System Aggregator Module (SSAM) devices.

Provides a module and driver which act as a device-registry for SSAM
client devices that cannot be detected automatically, e.g. via ACPI.
Such devices are instead provided via this registry and attached via
device hubs, also provided in this module.
Such devices are instead provided and managed via this registry.

Devices provided via this registry are:
- Platform profile (performance-/cooling-mode) device (5th- and later
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/surface/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ obj-$(CONFIG_SURFACE_3_POWER_OPREGION) += surface3_power.o
obj-$(CONFIG_SURFACE_ACPI_NOTIFY) += surface_acpi_notify.o
obj-$(CONFIG_SURFACE_AGGREGATOR) += aggregator/
obj-$(CONFIG_SURFACE_AGGREGATOR_CDEV) += surface_aggregator_cdev.o
obj-$(CONFIG_SURFACE_AGGREGATOR_HUB) += surface_aggregator_hub.o
obj-$(CONFIG_SURFACE_AGGREGATOR_REGISTRY) += surface_aggregator_registry.o
obj-$(CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH) += surface_aggregator_tabletsw.o
obj-$(CONFIG_SURFACE_DTX) += surface_dtx.o
Expand Down
Loading

0 comments on commit 993a9e2

Please sign in to comment.