platform/surface: Set up Surface Aggregator device registry
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 12 Feb 2021 11:54:34 +0000 (12:54 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sat, 6 Mar 2021 09:23:26 +0000 (10:23 +0100)
commitfc622b3d36e6d91330fb21506b9ad1e3206a4dde
tree3a3a89bada329dba9d8c48f9b328dfeab8a67979
parenta38fd8748464831584a19438cbb3082b5a2dab15
platform/surface: Set up Surface Aggregator device registry

The Surface System Aggregator Module (SSAM) subsystem provides various
functionalities, which are separated by spreading them across multiple
devices and corresponding drivers. Parts of that functionality / some of
those devices, however, can (as far as we currently know) not be
auto-detected by conventional means. While older (specifically 5th- and
6th-)generation models do advertise most of their functionality via
standard platform devices in ACPI, newer generations do not.

As we are currently also not aware of any feasible way to query said
functionalities dynamically, this poses a problem. There is, however, a
device in ACPI that seems to be used by Windows for identifying
different Surface models: The Windows Surface Integration Device (WSID).
This device seems to have a HID corresponding to the overall set of
functionalities SSAM provides for the associated model.

This commit introduces a registry providing non-detectable device
information via software nodes. In addition, a SSAM platform hub driver
is introduced, which takes care of creating and managing the SSAM
devices specified in this registry. This approach allows for a
hierarchical setup akin to ACPI and is easily extendable, e.g. via
firmware node properties.

Note that this commit only provides the basis for the platform hub and
registry, and does not add any content to it. The registry will be
expanded in subsequent commits.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210212115439.1525216-2-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
MAINTAINERS
drivers/platform/surface/Kconfig
drivers/platform/surface/Makefile
drivers/platform/surface/surface_aggregator_registry.c [new file with mode: 0644]