2022-06-24 21:07:31

by Maximilian Luz

[permalink] [raw]
Subject: [PATCH 0/3] platform/surface: Move Surface Aggregator client hubs to their own modules

This series moves the Surface Aggregator client device hubs from the
Surface Aggregator registry to their own modules. While, at the moment,
client device hubs are exclusively instantiated by the registry platform
hub driver, this will change in the future. In particular, with the
introduction of DT/OF support, which is required for the Surface Pro X.
Therefore, this series also slightly restructures the functions used for
software-node-based device instantiation, essentially acting as
preparation for that.

In addition, this series follows-up "platform/surface: aggregator: Add
support for client hot-removal" and further removes some code
duplication by consolidating more parts of the hub drivers. While at it,
also ensure proper handling of firmware node lifetimes and update the
copyright year of various files.

Maximilian Luz (3):
platform/surface: aggregator: Move device registry helper functions to
core module
platform/surface: aggregator: Move subsystem hub drivers to their own
module
platform/surface: Update copyright year of various drivers

MAINTAINERS | 6 +
drivers/platform/surface/Kconfig | 35 +-
drivers/platform/surface/Makefile | 1 +
drivers/platform/surface/aggregator/Kconfig | 2 +-
drivers/platform/surface/aggregator/Makefile | 2 +-
drivers/platform/surface/aggregator/bus.c | 151 +++++-
drivers/platform/surface/aggregator/bus.h | 2 +-
.../platform/surface/aggregator/controller.c | 2 +-
.../platform/surface/aggregator/controller.h | 2 +-
drivers/platform/surface/aggregator/core.c | 2 +-
.../platform/surface/aggregator/ssh_msgb.h | 2 +-
.../surface/aggregator/ssh_packet_layer.c | 2 +-
.../surface/aggregator/ssh_packet_layer.h | 2 +-
.../platform/surface/aggregator/ssh_parser.c | 2 +-
.../platform/surface/aggregator/ssh_parser.h | 2 +-
.../surface/aggregator/ssh_request_layer.c | 2 +-
.../surface/aggregator/ssh_request_layer.h | 2 +-
drivers/platform/surface/aggregator/trace.h | 2 +-
.../platform/surface/surface_acpi_notify.c | 2 +-
.../surface/surface_aggregator_cdev.c | 2 +-
.../platform/surface/surface_aggregator_hub.c | 371 +++++++++++++++
.../surface/surface_aggregator_registry.c | 446 +-----------------
drivers/platform/surface/surface_dtx.c | 2 +-
drivers/platform/surface/surface_gpe.c | 2 +-
drivers/platform/surface/surface_hotplug.c | 2 +-
.../surface/surface_platform_profile.c | 2 +-
include/linux/surface_aggregator/device.h | 52 ++
27 files changed, 618 insertions(+), 484 deletions(-)
create mode 100644 drivers/platform/surface/surface_aggregator_hub.c

--
2.36.1


2022-06-24 21:08:53

by Maximilian Luz

[permalink] [raw]
Subject: [PATCH 3/3] platform/surface: Update copyright year of various drivers

Update the copyright of various Surface drivers to the current year.

Signed-off-by: Maximilian Luz <[email protected]>
---
drivers/platform/surface/aggregator/Kconfig | 2 +-
drivers/platform/surface/aggregator/Makefile | 2 +-
drivers/platform/surface/aggregator/bus.c | 2 +-
drivers/platform/surface/aggregator/bus.h | 2 +-
drivers/platform/surface/aggregator/controller.c | 2 +-
drivers/platform/surface/aggregator/controller.h | 2 +-
drivers/platform/surface/aggregator/core.c | 2 +-
drivers/platform/surface/aggregator/ssh_msgb.h | 2 +-
drivers/platform/surface/aggregator/ssh_packet_layer.c | 2 +-
drivers/platform/surface/aggregator/ssh_packet_layer.h | 2 +-
drivers/platform/surface/aggregator/ssh_parser.c | 2 +-
drivers/platform/surface/aggregator/ssh_parser.h | 2 +-
drivers/platform/surface/aggregator/ssh_request_layer.c | 2 +-
drivers/platform/surface/aggregator/ssh_request_layer.h | 2 +-
drivers/platform/surface/aggregator/trace.h | 2 +-
drivers/platform/surface/surface_acpi_notify.c | 2 +-
drivers/platform/surface/surface_aggregator_cdev.c | 2 +-
drivers/platform/surface/surface_aggregator_registry.c | 2 +-
drivers/platform/surface/surface_dtx.c | 2 +-
drivers/platform/surface/surface_gpe.c | 2 +-
drivers/platform/surface/surface_hotplug.c | 2 +-
drivers/platform/surface/surface_platform_profile.c | 2 +-
22 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/platform/surface/aggregator/Kconfig b/drivers/platform/surface/aggregator/Kconfig
index cab020324256..c114f9dd5fe1 100644
--- a/drivers/platform/surface/aggregator/Kconfig
+++ b/drivers/platform/surface/aggregator/Kconfig
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+# Copyright (C) 2019-2022 Maximilian Luz <[email protected]>

menuconfig SURFACE_AGGREGATOR
tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
diff --git a/drivers/platform/surface/aggregator/Makefile b/drivers/platform/surface/aggregator/Makefile
index c0d550eda5cd..fdf664a217f9 100644
--- a/drivers/platform/surface/aggregator/Makefile
+++ b/drivers/platform/surface/aggregator/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+# Copyright (C) 2019-2022 Maximilian Luz <[email protected]>

# For include/trace/define_trace.h to include trace.h
CFLAGS_core.o = -I$(src)
diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
index e0b0381a2834..de539938896e 100644
--- a/drivers/platform/surface/aggregator/bus.c
+++ b/drivers/platform/surface/aggregator/bus.c
@@ -2,7 +2,7 @@
/*
* Surface System Aggregator Module bus and device integration.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <linux/device.h>
diff --git a/drivers/platform/surface/aggregator/bus.h b/drivers/platform/surface/aggregator/bus.h
index 6964ee84e79c..5b4dbf21906c 100644
--- a/drivers/platform/surface/aggregator/bus.h
+++ b/drivers/platform/surface/aggregator/bus.h
@@ -2,7 +2,7 @@
/*
* Surface System Aggregator Module bus and device integration.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_BUS_H
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
index 6de834b52b63..43e765199137 100644
--- a/drivers/platform/surface/aggregator/controller.c
+++ b/drivers/platform/surface/aggregator/controller.c
@@ -2,7 +2,7 @@
/*
* Main SSAM/SSH controller structure and functionality.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <linux/acpi.h>
diff --git a/drivers/platform/surface/aggregator/controller.h b/drivers/platform/surface/aggregator/controller.h
index a0963c3562ff..f0d987abc51e 100644
--- a/drivers/platform/surface/aggregator/controller.h
+++ b/drivers/platform/surface/aggregator/controller.h
@@ -2,7 +2,7 @@
/*
* Main SSAM/SSH controller structure and functionality.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_CONTROLLER_H
diff --git a/drivers/platform/surface/aggregator/core.c b/drivers/platform/surface/aggregator/core.c
index a62c5dfe42d6..1a6373dea109 100644
--- a/drivers/platform/surface/aggregator/core.c
+++ b/drivers/platform/surface/aggregator/core.c
@@ -7,7 +7,7 @@
* Handles communication via requests as well as enabling, disabling, and
* relaying of events.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <linux/acpi.h>
diff --git a/drivers/platform/surface/aggregator/ssh_msgb.h b/drivers/platform/surface/aggregator/ssh_msgb.h
index e562958ffdf0..f3ecad92eefd 100644
--- a/drivers/platform/surface/aggregator/ssh_msgb.h
+++ b/drivers/platform/surface/aggregator/ssh_msgb.h
@@ -2,7 +2,7 @@
/*
* SSH message builder functions.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_SSH_MSGB_H
diff --git a/drivers/platform/surface/aggregator/ssh_packet_layer.c b/drivers/platform/surface/aggregator/ssh_packet_layer.c
index 8a4451c1ffe5..6748fe4ac5d5 100644
--- a/drivers/platform/surface/aggregator/ssh_packet_layer.c
+++ b/drivers/platform/surface/aggregator/ssh_packet_layer.c
@@ -2,7 +2,7 @@
/*
* SSH packet transport layer.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <asm/unaligned.h>
diff --git a/drivers/platform/surface/aggregator/ssh_packet_layer.h b/drivers/platform/surface/aggregator/ssh_packet_layer.h
index 2eb329f0b91a..64633522f971 100644
--- a/drivers/platform/surface/aggregator/ssh_packet_layer.h
+++ b/drivers/platform/surface/aggregator/ssh_packet_layer.h
@@ -2,7 +2,7 @@
/*
* SSH packet transport layer.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_SSH_PACKET_LAYER_H
diff --git a/drivers/platform/surface/aggregator/ssh_parser.c b/drivers/platform/surface/aggregator/ssh_parser.c
index b77912f8f13b..a6f668694365 100644
--- a/drivers/platform/surface/aggregator/ssh_parser.c
+++ b/drivers/platform/surface/aggregator/ssh_parser.c
@@ -2,7 +2,7 @@
/*
* SSH message parser.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <asm/unaligned.h>
diff --git a/drivers/platform/surface/aggregator/ssh_parser.h b/drivers/platform/surface/aggregator/ssh_parser.h
index 3bd6e180fd16..801d8fa69fb5 100644
--- a/drivers/platform/surface/aggregator/ssh_parser.h
+++ b/drivers/platform/surface/aggregator/ssh_parser.h
@@ -2,7 +2,7 @@
/*
* SSH message parser.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_SSH_PARSER_H
diff --git a/drivers/platform/surface/aggregator/ssh_request_layer.c b/drivers/platform/surface/aggregator/ssh_request_layer.c
index 790f7f0eee98..f5565570f16c 100644
--- a/drivers/platform/surface/aggregator/ssh_request_layer.c
+++ b/drivers/platform/surface/aggregator/ssh_request_layer.c
@@ -2,7 +2,7 @@
/*
* SSH request transport layer.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <asm/unaligned.h>
diff --git a/drivers/platform/surface/aggregator/ssh_request_layer.h b/drivers/platform/surface/aggregator/ssh_request_layer.h
index 9c3cbae2d4bd..4e387a031351 100644
--- a/drivers/platform/surface/aggregator/ssh_request_layer.h
+++ b/drivers/platform/surface/aggregator/ssh_request_layer.h
@@ -2,7 +2,7 @@
/*
* SSH request transport layer.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#ifndef _SURFACE_AGGREGATOR_SSH_REQUEST_LAYER_H
diff --git a/drivers/platform/surface/aggregator/trace.h b/drivers/platform/surface/aggregator/trace.h
index cc9e73fbc18e..2a2c17771d01 100644
--- a/drivers/platform/surface/aggregator/trace.h
+++ b/drivers/platform/surface/aggregator/trace.h
@@ -2,7 +2,7 @@
/*
* Trace points for SSAM/SSH.
*
- * Copyright (C) 2020-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2020-2022 Maximilian Luz <[email protected]>
*/

#undef TRACE_SYSTEM
diff --git a/drivers/platform/surface/surface_acpi_notify.c b/drivers/platform/surface/surface_acpi_notify.c
index c0e12f0b9b79..44e317970557 100644
--- a/drivers/platform/surface/surface_acpi_notify.c
+++ b/drivers/platform/surface/surface_acpi_notify.c
@@ -8,7 +8,7 @@
* notifications sent from ACPI via the SAN interface by providing them to any
* registered external driver.
*
- * Copyright (C) 2019-2020 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <asm/unaligned.h>
diff --git a/drivers/platform/surface/surface_aggregator_cdev.c b/drivers/platform/surface/surface_aggregator_cdev.c
index 30fb50fde450..492c82e69182 100644
--- a/drivers/platform/surface/surface_aggregator_cdev.c
+++ b/drivers/platform/surface/surface_aggregator_cdev.c
@@ -3,7 +3,7 @@
* Provides user-space access to the SSAM EC via the /dev/surface/aggregator
* misc device. Intended for debugging and development.
*
- * Copyright (C) 2020-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2020-2022 Maximilian Luz <[email protected]>
*/

#include <linux/fs.h>
diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index 0cbb7f3a6b2d..d5655f6a4a41 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c
+++ b/drivers/platform/surface/surface_aggregator_registry.c
@@ -6,7 +6,7 @@
* cannot be auto-detected. Provides device-hubs and performs instantiation
* for these devices.
*
- * Copyright (C) 2020-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2020-2022 Maximilian Luz <[email protected]>
*/

#include <linux/acpi.h>
diff --git a/drivers/platform/surface/surface_dtx.c b/drivers/platform/surface/surface_dtx.c
index 1203b9a82993..ed36944467f9 100644
--- a/drivers/platform/surface/surface_dtx.c
+++ b/drivers/platform/surface/surface_dtx.c
@@ -8,7 +8,7 @@
* acknowledge (to speed things up), abort (e.g. in case the dGPU is still in
* use), or request detachment via user-space.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <linux/fs.h>
diff --git a/drivers/platform/surface/surface_gpe.c b/drivers/platform/surface/surface_gpe.c
index ec66fde28e75..27365cbe1ee9 100644
--- a/drivers/platform/surface/surface_gpe.c
+++ b/drivers/platform/surface/surface_gpe.c
@@ -4,7 +4,7 @@
* properly configuring the respective GPEs. Required for wakeup via lid on
* newer Intel-based Microsoft Surface devices.
*
- * Copyright (C) 2020 Maximilian Luz <[email protected]>
+ * Copyright (C) 2020-2022 Maximilian Luz <[email protected]>
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/platform/surface/surface_hotplug.c b/drivers/platform/surface/surface_hotplug.c
index cfcc15cfbacb..f004a2495201 100644
--- a/drivers/platform/surface/surface_hotplug.c
+++ b/drivers/platform/surface/surface_hotplug.c
@@ -10,7 +10,7 @@
* Event signaling is handled via ACPI, which will generate the appropriate
* device-check notifications to be picked up by the PCIe hot-plug driver.
*
- * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2019-2022 Maximilian Luz <[email protected]>
*/

#include <linux/acpi.h>
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c
index 6373d3b5eb7f..fbf2e11fd6ce 100644
--- a/drivers/platform/surface/surface_platform_profile.c
+++ b/drivers/platform/surface/surface_platform_profile.c
@@ -3,7 +3,7 @@
* Surface Platform Profile / Performance Mode driver for Surface System
* Aggregator Module (thermal subsystem).
*
- * Copyright (C) 2021 Maximilian Luz <[email protected]>
+ * Copyright (C) 2021-2022 Maximilian Luz <[email protected]>
*/

#include <asm/unaligned.h>
--
2.36.1

2022-07-02 09:57:11

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 0/3] platform/surface: Move Surface Aggregator client hubs to their own modules

Hi,

On 6/24/22 22:57, Maximilian Luz wrote:
> This series moves the Surface Aggregator client device hubs from the
> Surface Aggregator registry to their own modules. While, at the moment,
> client device hubs are exclusively instantiated by the registry platform
> hub driver, this will change in the future. In particular, with the
> introduction of DT/OF support, which is required for the Surface Pro X.
> Therefore, this series also slightly restructures the functions used for
> software-node-based device instantiation, essentially acting as
> preparation for that.
>
> In addition, this series follows-up "platform/surface: aggregator: Add
> support for client hot-removal" and further removes some code
> duplication by consolidating more parts of the hub drivers. While at it,
> also ensure proper handling of firmware node lifetimes and update the
> copyright year of various files.

Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans

>
> Maximilian Luz (3):
> platform/surface: aggregator: Move device registry helper functions to
> core module
> platform/surface: aggregator: Move subsystem hub drivers to their own
> module
> platform/surface: Update copyright year of various drivers
>
> MAINTAINERS | 6 +
> drivers/platform/surface/Kconfig | 35 +-
> drivers/platform/surface/Makefile | 1 +
> drivers/platform/surface/aggregator/Kconfig | 2 +-
> drivers/platform/surface/aggregator/Makefile | 2 +-
> drivers/platform/surface/aggregator/bus.c | 151 +++++-
> drivers/platform/surface/aggregator/bus.h | 2 +-
> .../platform/surface/aggregator/controller.c | 2 +-
> .../platform/surface/aggregator/controller.h | 2 +-
> drivers/platform/surface/aggregator/core.c | 2 +-
> .../platform/surface/aggregator/ssh_msgb.h | 2 +-
> .../surface/aggregator/ssh_packet_layer.c | 2 +-
> .../surface/aggregator/ssh_packet_layer.h | 2 +-
> .../platform/surface/aggregator/ssh_parser.c | 2 +-
> .../platform/surface/aggregator/ssh_parser.h | 2 +-
> .../surface/aggregator/ssh_request_layer.c | 2 +-
> .../surface/aggregator/ssh_request_layer.h | 2 +-
> drivers/platform/surface/aggregator/trace.h | 2 +-
> .../platform/surface/surface_acpi_notify.c | 2 +-
> .../surface/surface_aggregator_cdev.c | 2 +-
> .../platform/surface/surface_aggregator_hub.c | 371 +++++++++++++++
> .../surface/surface_aggregator_registry.c | 446 +-----------------
> drivers/platform/surface/surface_dtx.c | 2 +-
> drivers/platform/surface/surface_gpe.c | 2 +-
> drivers/platform/surface/surface_hotplug.c | 2 +-
> .../surface/surface_platform_profile.c | 2 +-
> include/linux/surface_aggregator/device.h | 52 ++
> 27 files changed, 618 insertions(+), 484 deletions(-)
> create mode 100644 drivers/platform/surface/surface_aggregator_hub.c
>