platform/surface: aggregator: Move device registry helper functions to core module
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 24 Jun 2022 20:57:58 +0000 (22:57 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sat, 2 Jul 2022 09:23:14 +0000 (11:23 +0200)
commit4a4ab610b8ae912c28a4fd28442ef24ed7a1a5bd
tree87e9f89d0476660b7124d90835b7fbf06be70a21
parent70e85eb071a118c13b690df595bd8129e9fbbe79
platform/surface: aggregator: Move device registry helper functions to core module

Move helper functions for client device registration to the core module.
This simplifies addition of future DT/OF support and also allows us to
split out the device hub drivers into their own module.

At the same time, also improve device node validation a bit by not
silently skipping devices with invalid device UID specifiers. Further,
ensure proper lifetime management for the firmware/software nodes
associated with the added devices.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20220624205800.1355621-2-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/surface/aggregator/bus.c
drivers/platform/surface/surface_aggregator_registry.c
include/linux/surface_aggregator/device.h