• Maximilian Luz's avatar
    platform/surface: aggregator_registry: Generify subsystem hub functionality · 1aa4c85b
    Maximilian Luz authored
    The Surface System Aggregator Module (SSAM) has multiple subsystems that
    can manage detachable devices. At the moment, we only support the "base"
    (BAS/0x11) subsystem, which is used on the Surface Book 3 to manage
    devices (including keyboard, touchpad, and secondary battery) connected
    to the base of the device.
    
    The Surface Pro 8 has a new type-cover with keyboard and touchpad, which
    is managed via the KIP/0x0e subsystem. The general procedure is the
    same, but with slightly different events and setup. To make
    implementation of the KIP hub easier and prevent duplication, generify
    the parts of the base hub that we can use for the KIP hub (or any
    potential future subsystem hubs).
    
    This also switches over to use the newly introduced "hot-remove"
    functionality, which should prevent communication issues when devices
    have been detached.
    
    Lastly, also drop the undocumented and unused sysfs "state" attribute of
    the base hub. It has at best been useful for debugging.
    Signed-off-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20220527023447.2460025-10-luzmaximilian@gmail.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    1aa4c85b
surface_aggregator_registry.c 18 KB