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>
2021-02-12 04:54:34 -07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/*
|
|
|
|
* Surface System Aggregator Module (SSAM) client device registry.
|
|
|
|
*
|
|
|
|
* Registry for non-platform/non-ACPI SSAM client devices, i.e. devices that
|
|
|
|
* cannot be auto-detected. Provides device-hubs and performs instantiation
|
|
|
|
* for these devices.
|
|
|
|
*
|
2022-06-24 13:58:00 -07:00
|
|
|
* Copyright (C) 2020-2022 Maximilian Luz <luzmaximilian@gmail.com>
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/acpi.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
2024-08-14 03:27:27 -07:00
|
|
|
#include <linux/of.h>
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/property.h>
|
2021-02-12 04:54:35 -07:00
|
|
|
#include <linux/types.h>
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
#include <linux/surface_aggregator/device.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* -- Device registry. ------------------------------------------------------ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SSAM device names follow the SSAM module alias, meaning they are prefixed
|
|
|
|
* with 'ssam:', followed by domain, category, target ID, instance ID, and
|
|
|
|
* function, each encoded as two-digit hexadecimal, separated by ':'. In other
|
|
|
|
* words, it follows the scheme
|
|
|
|
*
|
|
|
|
* ssam:dd:cc:tt:ii:ff
|
|
|
|
*
|
|
|
|
* Where, 'dd', 'cc', 'tt', 'ii', and 'ff' are the two-digit hexadecimal
|
|
|
|
* values mentioned above, respectively.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Root node. */
|
|
|
|
static const struct software_node ssam_node_root = {
|
|
|
|
.name = "ssam_platform_hub",
|
|
|
|
};
|
|
|
|
|
2022-05-26 19:34:47 -07:00
|
|
|
/* KIP device hub (connects keyboard cover devices on Surface Pro 8). */
|
|
|
|
static const struct software_node ssam_node_hub_kip = {
|
|
|
|
.name = "ssam:00:00:01:0e:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2021-02-12 04:54:35 -07:00
|
|
|
/* Base device hub (devices attached to Surface Book 3 base). */
|
|
|
|
static const struct software_node ssam_node_hub_base = {
|
2022-12-02 15:33:27 -07:00
|
|
|
.name = "ssam:00:00:01:11:00",
|
2021-02-12 04:54:35 -07:00
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2021-02-12 04:54:36 -07:00
|
|
|
/* AC adapter. */
|
|
|
|
static const struct software_node ssam_node_bat_ac = {
|
|
|
|
.name = "ssam:01:02:01:01:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Primary battery. */
|
|
|
|
static const struct software_node ssam_node_bat_main = {
|
|
|
|
.name = "ssam:01:02:01:01:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Secondary battery (Surface Book 3). */
|
|
|
|
static const struct software_node ssam_node_bat_sb3base = {
|
|
|
|
.name = "ssam:01:02:02:01:00",
|
|
|
|
.parent = &ssam_node_hub_base,
|
|
|
|
};
|
|
|
|
|
2024-03-14 15:37:33 -07:00
|
|
|
/* Platform profile / performance-mode device without a fan. */
|
|
|
|
static const struct software_node ssam_node_tmp_perf_profile = {
|
2021-02-12 04:54:37 -07:00
|
|
|
.name = "ssam:01:03:01:00:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2024-03-14 15:37:33 -07:00
|
|
|
/* Platform profile / performance-mode device with a fan, such that
|
|
|
|
* the fan controller profile can also be switched.
|
|
|
|
*/
|
|
|
|
static const struct property_entry ssam_node_tmp_perf_profile_has_fan[] = {
|
|
|
|
PROPERTY_ENTRY_BOOL("has_fan"),
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct software_node ssam_node_tmp_perf_profile_with_fan = {
|
|
|
|
.name = "ssam:01:03:01:00:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
.properties = ssam_node_tmp_perf_profile_has_fan,
|
|
|
|
};
|
|
|
|
|
2024-03-30 04:24:02 -07:00
|
|
|
/* Thermal sensors. */
|
|
|
|
static const struct software_node ssam_node_tmp_sensors = {
|
|
|
|
.name = "ssam:01:03:01:00:02",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2024-01-30 17:58:56 -07:00
|
|
|
/* Fan speed function. */
|
|
|
|
static const struct software_node ssam_node_fan_speed = {
|
|
|
|
.name = "ssam:01:05:01:01:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-06-24 11:36:41 -07:00
|
|
|
/* Tablet-mode switch via KIP subsystem. */
|
|
|
|
static const struct software_node ssam_node_kip_tablet_switch = {
|
|
|
|
.name = "ssam:01:0e:01:00:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2021-02-12 04:54:38 -07:00
|
|
|
/* DTX / detachment-system device (Surface Book 3). */
|
|
|
|
static const struct software_node ssam_node_bas_dtx = {
|
|
|
|
.name = "ssam:01:11:01:00:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID keyboard (SAM, TID=1). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_keyboard = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:01:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID pen stash (SAM, TID=1; pen taken / stashed away evens). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_penstash = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:02:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID touchpad (SAM, TID=1). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_touchpad = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:03:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID device instance 6 (SAM, TID=1, HID sensor collection). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_sensors = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:06:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID device instance 7 (SAM, TID=1, UCM UCSI HID client). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_ucm_ucsi = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:07:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:16 -07:00
|
|
|
/* HID system controls (SAM, TID=1). */
|
|
|
|
static const struct software_node ssam_node_hid_sam_sysctrl = {
|
2021-10-21 06:09:02 -07:00
|
|
|
.name = "ssam:01:15:01:08:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2021-02-12 04:54:39 -07:00
|
|
|
/* HID keyboard. */
|
|
|
|
static const struct software_node ssam_node_hid_main_keyboard = {
|
|
|
|
.name = "ssam:01:15:02:01:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID touchpad. */
|
|
|
|
static const struct software_node ssam_node_hid_main_touchpad = {
|
|
|
|
.name = "ssam:01:15:02:03:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID device instance 5 (unknown HID device). */
|
|
|
|
static const struct software_node ssam_node_hid_main_iid5 = {
|
|
|
|
.name = "ssam:01:15:02:05:00",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID keyboard (base hub). */
|
|
|
|
static const struct software_node ssam_node_hid_base_keyboard = {
|
|
|
|
.name = "ssam:01:15:02:01:00",
|
|
|
|
.parent = &ssam_node_hub_base,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID touchpad (base hub). */
|
|
|
|
static const struct software_node ssam_node_hid_base_touchpad = {
|
|
|
|
.name = "ssam:01:15:02:03:00",
|
|
|
|
.parent = &ssam_node_hub_base,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID device instance 5 (unknown HID device, base hub). */
|
|
|
|
static const struct software_node ssam_node_hid_base_iid5 = {
|
|
|
|
.name = "ssam:01:15:02:05:00",
|
|
|
|
.parent = &ssam_node_hub_base,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID device instance 6 (unknown HID device, base hub). */
|
|
|
|
static const struct software_node ssam_node_hid_base_iid6 = {
|
|
|
|
.name = "ssam:01:15:02:06:00",
|
|
|
|
.parent = &ssam_node_hub_base,
|
|
|
|
};
|
|
|
|
|
2022-05-26 19:34:47 -07:00
|
|
|
/* HID keyboard (KIP hub). */
|
|
|
|
static const struct software_node ssam_node_hid_kip_keyboard = {
|
|
|
|
.name = "ssam:01:15:02:01:00",
|
|
|
|
.parent = &ssam_node_hub_kip,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID pen stash (KIP hub; pen taken / stashed away evens). */
|
|
|
|
static const struct software_node ssam_node_hid_kip_penstash = {
|
|
|
|
.name = "ssam:01:15:02:02:00",
|
|
|
|
.parent = &ssam_node_hub_kip,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* HID touchpad (KIP hub). */
|
|
|
|
static const struct software_node ssam_node_hid_kip_touchpad = {
|
|
|
|
.name = "ssam:01:15:02:03:00",
|
|
|
|
.parent = &ssam_node_hub_kip,
|
|
|
|
};
|
|
|
|
|
2022-08-10 07:41:15 -07:00
|
|
|
/* HID device instance 5 (KIP hub, type-cover firmware update). */
|
|
|
|
static const struct software_node ssam_node_hid_kip_fwupd = {
|
2022-05-26 19:34:47 -07:00
|
|
|
.name = "ssam:01:15:02:05:00",
|
|
|
|
.parent = &ssam_node_hub_kip,
|
|
|
|
};
|
|
|
|
|
2022-06-24 11:36:42 -07:00
|
|
|
/* Tablet-mode switch via POS subsystem. */
|
|
|
|
static const struct software_node ssam_node_pos_tablet_switch = {
|
|
|
|
.name = "ssam:01:26:01:00:01",
|
|
|
|
.parent = &ssam_node_root,
|
|
|
|
};
|
|
|
|
|
2021-05-23 06:45:28 -07:00
|
|
|
/*
|
|
|
|
* Devices for 5th- and 6th-generations models:
|
|
|
|
* - Surface Book 2,
|
|
|
|
* - Surface Laptop 1 and 2,
|
|
|
|
* - Surface Pro 5 and 6.
|
|
|
|
*/
|
|
|
|
static const struct software_node *ssam_node_group_gen5[] = {
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
&ssam_node_root,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Devices for Surface Book 3. */
|
|
|
|
static const struct software_node *ssam_node_group_sb3[] = {
|
|
|
|
&ssam_node_root,
|
2021-02-12 04:54:35 -07:00
|
|
|
&ssam_node_hub_base,
|
2021-02-12 04:54:36 -07:00
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
|
|
|
&ssam_node_bat_sb3base,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
2021-02-12 04:54:38 -07:00
|
|
|
&ssam_node_bas_dtx,
|
2021-02-12 04:54:39 -07:00
|
|
|
&ssam_node_hid_base_keyboard,
|
|
|
|
&ssam_node_hid_base_touchpad,
|
|
|
|
&ssam_node_hid_base_iid5,
|
|
|
|
&ssam_node_hid_base_iid6,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2021-05-23 06:45:26 -07:00
|
|
|
/* Devices for Surface Laptop 3 and 4. */
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
static const struct software_node *ssam_node_group_sl3[] = {
|
|
|
|
&ssam_node_root,
|
2021-02-12 04:54:36 -07:00
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
2021-02-12 04:54:39 -07:00
|
|
|
&ssam_node_hid_main_keyboard,
|
|
|
|
&ssam_node_hid_main_touchpad,
|
|
|
|
&ssam_node_hid_main_iid5,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2022-11-15 16:14:40 -07:00
|
|
|
/* Devices for Surface Laptop 5. */
|
|
|
|
static const struct software_node *ssam_node_group_sl5[] = {
|
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-08-11 06:19:47 -07:00
|
|
|
&ssam_node_tmp_perf_profile_with_fan,
|
|
|
|
&ssam_node_tmp_sensors,
|
|
|
|
&ssam_node_fan_speed,
|
2022-11-15 16:14:40 -07:00
|
|
|
&ssam_node_hid_main_keyboard,
|
|
|
|
&ssam_node_hid_main_touchpad,
|
|
|
|
&ssam_node_hid_main_iid5,
|
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2024-08-11 06:19:48 -07:00
|
|
|
/* Devices for Surface Laptop 6. */
|
|
|
|
static const struct software_node *ssam_node_group_sl6[] = {
|
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
|
|
|
&ssam_node_tmp_perf_profile_with_fan,
|
|
|
|
&ssam_node_tmp_sensors,
|
|
|
|
&ssam_node_fan_speed,
|
2022-11-15 16:14:40 -07:00
|
|
|
&ssam_node_hid_main_keyboard,
|
|
|
|
&ssam_node_hid_main_touchpad,
|
|
|
|
&ssam_node_hid_main_iid5,
|
2024-08-11 06:19:48 -07:00
|
|
|
&ssam_node_hid_sam_sensors,
|
2022-11-15 16:14:40 -07:00
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2024-08-14 03:27:27 -07:00
|
|
|
/* Devices for Surface Laptop 7. */
|
|
|
|
static const struct software_node *ssam_node_group_sl7[] = {
|
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
|
|
|
&ssam_node_tmp_perf_profile_with_fan,
|
|
|
|
&ssam_node_fan_speed,
|
|
|
|
&ssam_node_hid_sam_keyboard,
|
|
|
|
/* TODO: evaluate thermal sensors devices when we get a driver for that */
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2024-08-11 06:19:46 -07:00
|
|
|
/* Devices for Surface Laptop Studio 1. */
|
|
|
|
static const struct software_node *ssam_node_group_sls1[] = {
|
2021-10-21 06:09:02 -07:00
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
2022-06-24 11:36:42 -07:00
|
|
|
&ssam_node_pos_tablet_switch,
|
2022-08-10 07:41:16 -07:00
|
|
|
&ssam_node_hid_sam_keyboard,
|
|
|
|
&ssam_node_hid_sam_penstash,
|
|
|
|
&ssam_node_hid_sam_touchpad,
|
|
|
|
&ssam_node_hid_sam_sensors,
|
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
|
|
|
&ssam_node_hid_sam_sysctrl,
|
2021-10-21 06:09:02 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2024-08-11 06:19:46 -07:00
|
|
|
/* Devices for Surface Laptop Studio 2. */
|
|
|
|
static const struct software_node *ssam_node_group_sls2[] = {
|
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
|
|
|
&ssam_node_tmp_perf_profile_with_fan,
|
|
|
|
&ssam_node_tmp_sensors,
|
|
|
|
&ssam_node_fan_speed,
|
|
|
|
&ssam_node_pos_tablet_switch,
|
|
|
|
&ssam_node_hid_sam_keyboard,
|
|
|
|
&ssam_node_hid_sam_penstash,
|
|
|
|
&ssam_node_hid_sam_sensors,
|
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
/* Devices for Surface Laptop Go. */
|
|
|
|
static const struct software_node *ssam_node_group_slg1[] = {
|
|
|
|
&ssam_node_root,
|
2021-02-12 04:54:36 -07:00
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2021-03-09 09:25:50 -07:00
|
|
|
/* Devices for Surface Pro 7 and Surface Pro 7+. */
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
static const struct software_node *ssam_node_group_sp7[] = {
|
|
|
|
&ssam_node_root,
|
2021-02-12 04:54:36 -07:00
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2022-11-13 11:59:51 -07:00
|
|
|
/* Devices for Surface Pro 8 */
|
2021-10-27 18:28:45 -07:00
|
|
|
static const struct software_node *ssam_node_group_sp8[] = {
|
|
|
|
&ssam_node_root,
|
2022-05-26 19:34:47 -07:00
|
|
|
&ssam_node_hub_kip,
|
2021-10-27 18:28:45 -07:00
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile,
|
2022-06-24 11:36:41 -07:00
|
|
|
&ssam_node_kip_tablet_switch,
|
2022-05-26 19:34:47 -07:00
|
|
|
&ssam_node_hid_kip_keyboard,
|
|
|
|
&ssam_node_hid_kip_penstash,
|
|
|
|
&ssam_node_hid_kip_touchpad,
|
2022-08-10 07:41:15 -07:00
|
|
|
&ssam_node_hid_kip_fwupd,
|
2022-08-10 07:41:17 -07:00
|
|
|
&ssam_node_hid_sam_sensors,
|
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
2021-10-27 18:28:45 -07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2024-08-11 06:19:44 -07:00
|
|
|
/* Devices for Surface Pro 9 and 10 */
|
2022-11-13 11:59:51 -07:00
|
|
|
static const struct software_node *ssam_node_group_sp9[] = {
|
|
|
|
&ssam_node_root,
|
|
|
|
&ssam_node_hub_kip,
|
|
|
|
&ssam_node_bat_ac,
|
|
|
|
&ssam_node_bat_main,
|
2024-03-14 15:37:33 -07:00
|
|
|
&ssam_node_tmp_perf_profile_with_fan,
|
2024-03-30 04:24:02 -07:00
|
|
|
&ssam_node_tmp_sensors,
|
2024-01-30 17:58:56 -07:00
|
|
|
&ssam_node_fan_speed,
|
2023-03-04 12:46:11 -07:00
|
|
|
&ssam_node_pos_tablet_switch,
|
2022-11-13 11:59:51 -07:00
|
|
|
&ssam_node_hid_kip_keyboard,
|
|
|
|
&ssam_node_hid_kip_penstash,
|
|
|
|
&ssam_node_hid_kip_touchpad,
|
|
|
|
&ssam_node_hid_kip_fwupd,
|
|
|
|
&ssam_node_hid_sam_sensors,
|
|
|
|
&ssam_node_hid_sam_ucm_ucsi,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* -- SSAM platform/meta-hub driver. ---------------------------------------- */
|
|
|
|
|
2024-08-14 03:27:27 -07:00
|
|
|
static const struct acpi_device_id ssam_platform_hub_acpi_match[] = {
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
/* Surface Pro 4, 5, and 6 (OMBR < 0x10) */
|
2021-05-23 06:45:28 -07:00
|
|
|
{ "MSHW0081", (unsigned long)ssam_node_group_gen5 },
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* Surface Pro 6 (OMBR >= 0x10) */
|
2021-05-23 06:45:28 -07:00
|
|
|
{ "MSHW0111", (unsigned long)ssam_node_group_gen5 },
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* Surface Pro 7 */
|
|
|
|
{ "MSHW0116", (unsigned long)ssam_node_group_sp7 },
|
|
|
|
|
2021-03-09 09:25:50 -07:00
|
|
|
/* Surface Pro 7+ */
|
|
|
|
{ "MSHW0119", (unsigned long)ssam_node_group_sp7 },
|
|
|
|
|
2021-10-27 18:28:45 -07:00
|
|
|
/* Surface Pro 8 */
|
|
|
|
{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
|
|
|
|
|
2022-11-13 11:59:51 -07:00
|
|
|
/* Surface Pro 9 */
|
|
|
|
{ "MSHW0343", (unsigned long)ssam_node_group_sp9 },
|
|
|
|
|
2024-08-11 06:19:44 -07:00
|
|
|
/* Surface Pro 10 */
|
|
|
|
{ "MSHW0510", (unsigned long)ssam_node_group_sp9 },
|
|
|
|
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
/* Surface Book 2 */
|
2021-05-23 06:45:28 -07:00
|
|
|
{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* Surface Book 3 */
|
|
|
|
{ "MSHW0117", (unsigned long)ssam_node_group_sb3 },
|
|
|
|
|
|
|
|
/* Surface Laptop 1 */
|
2021-05-23 06:45:28 -07:00
|
|
|
{ "MSHW0086", (unsigned long)ssam_node_group_gen5 },
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* Surface Laptop 2 */
|
2021-05-23 06:45:28 -07:00
|
|
|
{ "MSHW0112", (unsigned long)ssam_node_group_gen5 },
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/* Surface Laptop 3 (13", Intel) */
|
|
|
|
{ "MSHW0114", (unsigned long)ssam_node_group_sl3 },
|
|
|
|
|
2021-05-23 06:45:26 -07:00
|
|
|
/* Surface Laptop 3 (15", AMD) and 4 (15", AMD) */
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
{ "MSHW0110", (unsigned long)ssam_node_group_sl3 },
|
|
|
|
|
2021-05-23 06:45:27 -07:00
|
|
|
/* Surface Laptop 4 (13", Intel) */
|
|
|
|
{ "MSHW0250", (unsigned long)ssam_node_group_sl3 },
|
|
|
|
|
2022-11-15 16:14:40 -07:00
|
|
|
/* Surface Laptop 5 */
|
|
|
|
{ "MSHW0350", (unsigned long)ssam_node_group_sl5 },
|
|
|
|
|
2024-08-11 06:19:48 -07:00
|
|
|
/* Surface Laptop 6 */
|
|
|
|
{ "MSHW0530", (unsigned long)ssam_node_group_sl6 },
|
|
|
|
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
/* Surface Laptop Go 1 */
|
|
|
|
{ "MSHW0118", (unsigned long)ssam_node_group_slg1 },
|
|
|
|
|
2022-08-10 07:01:33 -07:00
|
|
|
/* Surface Laptop Go 2 */
|
|
|
|
{ "MSHW0290", (unsigned long)ssam_node_group_slg1 },
|
|
|
|
|
2024-08-11 06:19:45 -07:00
|
|
|
/* Surface Laptop Go 3 */
|
|
|
|
{ "MSHW0440", (unsigned long)ssam_node_group_slg1 },
|
|
|
|
|
2024-08-11 06:19:46 -07:00
|
|
|
/* Surface Laptop Studio 1 */
|
|
|
|
{ "MSHW0123", (unsigned long)ssam_node_group_sls1 },
|
|
|
|
|
|
|
|
/* Surface Laptop Studio 2 */
|
|
|
|
{ "MSHW0360", (unsigned long)ssam_node_group_sls2 },
|
2021-10-21 06:09:02 -07:00
|
|
|
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
{ },
|
|
|
|
};
|
2024-08-14 03:27:27 -07:00
|
|
|
MODULE_DEVICE_TABLE(acpi, ssam_platform_hub_acpi_match);
|
|
|
|
|
|
|
|
static const struct of_device_id ssam_platform_hub_of_match[] __maybe_unused = {
|
|
|
|
/* Surface Laptop 7 */
|
|
|
|
{ .compatible = "microsoft,romulus13", (void *)ssam_node_group_sl7 },
|
|
|
|
{ .compatible = "microsoft,romulus15", (void *)ssam_node_group_sl7 },
|
|
|
|
{ },
|
|
|
|
};
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
static int ssam_platform_hub_probe(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
const struct software_node **nodes;
|
2024-08-14 03:27:27 -07:00
|
|
|
const struct of_device_id *match;
|
|
|
|
struct device_node *fdt_root;
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
struct ssam_controller *ctrl;
|
|
|
|
struct fwnode_handle *root;
|
|
|
|
int status;
|
|
|
|
|
|
|
|
nodes = (const struct software_node **)acpi_device_get_match_data(&pdev->dev);
|
2024-08-14 03:27:27 -07:00
|
|
|
if (!nodes) {
|
|
|
|
fdt_root = of_find_node_by_path("/");
|
|
|
|
if (!fdt_root)
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
match = of_match_node(ssam_platform_hub_of_match, fdt_root);
|
|
|
|
of_node_put(fdt_root);
|
|
|
|
if (!match)
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
nodes = (const struct software_node **)match->data;
|
|
|
|
if (!nodes)
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* As we're adding the SSAM client devices as children under this device
|
|
|
|
* and not the SSAM controller, we need to add a device link to the
|
|
|
|
* controller to ensure that we remove all of our devices before the
|
|
|
|
* controller is removed. This also guarantees proper ordering for
|
|
|
|
* suspend/resume of the devices on this hub.
|
|
|
|
*/
|
|
|
|
ctrl = ssam_client_bind(&pdev->dev);
|
|
|
|
if (IS_ERR(ctrl))
|
|
|
|
return PTR_ERR(ctrl) == -ENODEV ? -EPROBE_DEFER : PTR_ERR(ctrl);
|
|
|
|
|
|
|
|
status = software_node_register_node_group(nodes);
|
|
|
|
if (status)
|
|
|
|
return status;
|
|
|
|
|
|
|
|
root = software_node_fwnode(&ssam_node_root);
|
|
|
|
if (!root) {
|
|
|
|
software_node_unregister_node_group(nodes);
|
|
|
|
return -ENOENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
set_secondary_fwnode(&pdev->dev, root);
|
|
|
|
|
2022-06-24 13:57:58 -07:00
|
|
|
status = __ssam_register_clients(&pdev->dev, ctrl, root);
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
if (status) {
|
|
|
|
set_secondary_fwnode(&pdev->dev, NULL);
|
|
|
|
software_node_unregister_node_group(nodes);
|
|
|
|
}
|
|
|
|
|
|
|
|
platform_set_drvdata(pdev, nodes);
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2023-09-17 13:38:02 -07:00
|
|
|
static void ssam_platform_hub_remove(struct platform_device *pdev)
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
{
|
|
|
|
const struct software_node **nodes = platform_get_drvdata(pdev);
|
|
|
|
|
2021-10-27 17:22:42 -07:00
|
|
|
ssam_remove_clients(&pdev->dev);
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
set_secondary_fwnode(&pdev->dev, NULL);
|
|
|
|
software_node_unregister_node_group(nodes);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct platform_driver ssam_platform_hub_driver = {
|
|
|
|
.probe = ssam_platform_hub_probe,
|
2023-09-17 13:38:02 -07:00
|
|
|
.remove_new = ssam_platform_hub_remove,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
.driver = {
|
|
|
|
.name = "surface_aggregator_platform_hub",
|
2024-08-14 03:27:27 -07:00
|
|
|
.acpi_match_table = ssam_platform_hub_acpi_match,
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
|
|
|
},
|
|
|
|
};
|
2022-06-24 13:57:59 -07:00
|
|
|
module_platform_driver(ssam_platform_hub_driver);
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
|
2024-08-14 03:27:27 -07:00
|
|
|
MODULE_ALIAS("platform:surface_aggregator_platform_hub");
|
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>
2021-02-12 04:54:34 -07:00
|
|
|
MODULE_AUTHOR("Maximilian Luz <luzmaximilian@gmail.com>");
|
|
|
|
MODULE_DESCRIPTION("Device-registry for Surface System Aggregator Module");
|
|
|
|
MODULE_LICENSE("GPL");
|