Skip to content

Commit 993a9e2

Browse files
qzedjwrdegoede
authored andcommitted
platform/surface: aggregator: Move subsystem hub drivers to their own 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]>
1 parent 4a4ab61 commit 993a9e2

File tree

5 files changed

+410
-374
lines changed

5 files changed

+410
-374
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13253,6 +13253,12 @@ F: include/linux/surface_acpi_notify.h
1325313253
F: include/linux/surface_aggregator/
1325413254
F: include/uapi/linux/surface_aggregator/
1325513255

13256+
MICROSOFT SURFACE SYSTEM AGGREGATOR HUB DRIVER
13257+
M: Maximilian Luz <[email protected]>
13258+
13259+
S: Maintained
13260+
F: drivers/platform/surface/surface_aggregator_hub.c
13261+
1325613262
MICROTEK X6 SCANNER
1325713263
M: Oliver Neukum <[email protected]>
1325813264
S: Maintained

drivers/platform/surface/Kconfig

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,45 @@ config SURFACE_AGGREGATOR_CDEV
7272
The provided interface is intended for debugging and development only,
7373
and should not be used otherwise.
7474

75+
config SURFACE_AGGREGATOR_HUB
76+
tristate "Surface System Aggregator Module Subsystem Device Hubs"
77+
depends on SURFACE_AGGREGATOR
78+
depends on SURFACE_AGGREGATOR_BUS
79+
help
80+
Device-hub drivers for Surface System Aggregator Module (SSAM) subsystem
81+
devices.
82+
83+
Provides subsystem hub drivers which manage client devices on various
84+
SSAM subsystems. In some subsystems, notably the BAS subsystem managing
85+
devices contained in the base of the Surface Book 3 and the KIP subsystem
86+
managing type-cover devices in the Surface Pro 8 and Surface Pro X,
87+
devices can be (hot-)removed. Hub devices and drivers are required to
88+
manage these subdevices.
89+
90+
Devices managed via these hubs are:
91+
- Battery/AC devices (Surface Book 3).
92+
- HID input devices (7th-generation and later models with detachable
93+
input devices).
94+
95+
Select M (recommended) or Y here if you want support for the above
96+
mentioned devices on the corresponding Surface models. Without this
97+
module, the respective devices mentioned above will not be instantiated
98+
and thus any functionality provided by them will be missing, even when
99+
drivers for these devices are present. This module only provides the
100+
respective subsystem hubs. Both drivers and device specification (e.g.
101+
via the Surface Aggregator Registry) for these devices still need to be
102+
selected via other options.
103+
75104
config SURFACE_AGGREGATOR_REGISTRY
76105
tristate "Surface System Aggregator Module Device Registry"
77106
depends on SURFACE_AGGREGATOR
78107
depends on SURFACE_AGGREGATOR_BUS
79108
help
80-
Device-registry and device-hubs for Surface System Aggregator Module
81-
(SSAM) devices.
109+
Device-registry for Surface System Aggregator Module (SSAM) devices.
82110

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

88115
Devices provided via this registry are:
89116
- Platform profile (performance-/cooling-mode) device (5th- and later

drivers/platform/surface/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ obj-$(CONFIG_SURFACE_3_POWER_OPREGION) += surface3_power.o
99
obj-$(CONFIG_SURFACE_ACPI_NOTIFY) += surface_acpi_notify.o
1010
obj-$(CONFIG_SURFACE_AGGREGATOR) += aggregator/
1111
obj-$(CONFIG_SURFACE_AGGREGATOR_CDEV) += surface_aggregator_cdev.o
12+
obj-$(CONFIG_SURFACE_AGGREGATOR_HUB) += surface_aggregator_hub.o
1213
obj-$(CONFIG_SURFACE_AGGREGATOR_REGISTRY) += surface_aggregator_registry.o
1314
obj-$(CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH) += surface_aggregator_tabletsw.o
1415
obj-$(CONFIG_SURFACE_DTX) += surface_dtx.o

0 commit comments

Comments
 (0)