platform/surface: aggregator_registry: Add base device hub
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 12 Feb 2021 11:54:35 +0000 (12:54 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sat, 6 Mar 2021 09:23:26 +0000 (10:23 +0100)
commit797e78564634275ed4fe6b3f586c4b96eb1d86bc
tree35b9c12aaaeac4904b5beef624971a6ccded404d
parentfc622b3d36e6d91330fb21506b9ad1e3206a4dde
platform/surface: aggregator_registry: Add base device hub

The Surface Book 3 has a detachable base part. While the top part
(so-called clipboard) contains the CPU, touchscreen, and primary
battery, the base contains, among other things, a keyboard, touchpad,
and secondary battery.

Those devices do not react well to being accessed when the base part is
detached and should thus be removed and added in sync with the base. To
facilitate this, we introduce a virtual base device hub, which
automatically removes or adds the devices registered under it.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210212115439.1525216-3-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/surface/surface_aggregator_registry.c