|
@@ -1,4 +1,4 @@
|
|
|
-From e843aba556dfdcc3eb52a59da2581ba07c129264 Mon Sep 17 00:00:00 2001
|
|
|
+From d501d2140e2dc54a5d99988ba98dbfd6444f2bbe Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:51 +0100
|
|
|
Subject: [PATCH] platform/surface: Add Surface Aggregator subsystem
|
|
@@ -9160,7 +9160,7 @@ index 000000000000..64276fbfa1d5
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From c27a9fdec42a6256b5a108771c1ccccb4a022129 Mon Sep 17 00:00:00 2001
|
|
|
+From a5b7ae79f792640dc79474da5be422c6e4dd5477 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:52 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add control packet allocation
|
|
@@ -9322,7 +9322,7 @@ index 058f111292ca..e8757d03f279 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From dfa18cda7bcd165f010296f86b979d8184c7c424 Mon Sep 17 00:00:00 2001
|
|
|
+From 988a56392c1e49e18ddfd3e185b97d8b280cc4ab Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:53 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add event item allocation
|
|
@@ -9550,7 +9550,7 @@ index 60d312f71436..37593234fb31 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 30c51ea3b67b30af16a7f79075ed72af3ed64449 Mon Sep 17 00:00:00 2001
|
|
|
+From dbc4ef3bb20b2219f42800683c52807790589050 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:54 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add trace points
|
|
@@ -10444,7 +10444,7 @@ index 000000000000..dcca8007d876
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From c71a61eda0fe21590831ace0887ca6714aa9d551 Mon Sep 17 00:00:00 2001
|
|
|
+From 9a6408b60fe57adb7962cabeadc18e914e25815b Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:55 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add error injection
|
|
@@ -10953,7 +10953,7 @@ index dcca8007d876..eb332bb53ae4 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 38a8ac1671564ba6cd91fdf7b226289da6e4b86a Mon Sep 17 00:00:00 2001
|
|
|
+From 0ed8048c061dc8066a03efcb18649d313595daaa Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:56 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add dedicated bus and device
|
|
@@ -12052,7 +12052,7 @@ index fb4827027536..d21d2871387b 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From cef2a8715a849b4416e2c3e8d0ef4a799a9f0c4b Mon Sep 17 00:00:00 2001
|
|
|
+From 942a3345fa7c106a7c21652d613c011a2bee8158 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:57 +0100
|
|
|
Subject: [PATCH] docs: driver-api: Add Surface Aggregator subsystem
|
|
@@ -13691,7 +13691,7 @@ index 2818a31d79db..c89d831e74e0 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From b1ef35b9076e896c80c2ddc77c694226db1aaee6 Mon Sep 17 00:00:00 2001
|
|
|
+From b18187e91146963b7d8b95614f2e95858dbe66b7 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:58 +0100
|
|
|
Subject: [PATCH] platform/surface: Add Surface Aggregator user-space interface
|
|
@@ -14303,7 +14303,7 @@ index 000000000000..fbcce04abfe9
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From b42609f185ad3142d58ef16df9a62b57fefeef96 Mon Sep 17 00:00:00 2001
|
|
|
+From ffdb38a97b3ed9b99a17954a733491ab144eb1b8 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 21 Dec 2020 19:39:59 +0100
|
|
|
Subject: [PATCH] platform/surface: Add Surface ACPI Notify driver
|
|
@@ -15418,7 +15418,7 @@ index 000000000000..8e3e86c7d78c
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From c4b99c73cfee54e7cf59c1cf45b4aee78fce2c81 Mon Sep 17 00:00:00 2001
|
|
|
+From d0c9ae12fba197f2b36046a22f6d784a0d2475e0 Mon Sep 17 00:00:00 2001
|
|
|
From: Colin Ian King <colin.king@canonical.com>
|
|
|
Date: Mon, 11 Jan 2021 14:46:48 +0000
|
|
|
Subject: [PATCH] platform/surface: fix potential integer overflow on shift of
|
|
@@ -15456,7 +15456,7 @@ index 8cd67a669c86..ef9c1f8e8336 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From dcda1b902b58d38b65fb1ed95d1657839e657d73 Mon Sep 17 00:00:00 2001
|
|
|
+From 11ffaa764df755d12a14176b203044b7e076fb77 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 11 Jan 2021 16:48:50 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_cdev: Fix access of
|
|
@@ -15496,7 +15496,7 @@ index 340d15b148b9..979340cdd9de 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 023b9d531d3e26d351d0aaed8c785fb2a3434f49 Mon Sep 17 00:00:00 2001
|
|
|
+From 08fcb5aabe345920327295828a343cb21b38266f Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 11 Jan 2021 16:48:51 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_cdev: Add comments regarding
|
|
@@ -15565,7 +15565,7 @@ index 979340cdd9de..79e28fab7e40 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 794b4e9ca8d93da88444b48aa486e923f7c1adb4 Mon Sep 17 00:00:00 2001
|
|
|
+From e40f24dbc901fdfa623d1ad48dc189fa0cd2cf05 Mon Sep 17 00:00:00 2001
|
|
|
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
|
Date: Thu, 14 Jan 2021 09:04:52 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: fix a kernel-doc markup
|
|
@@ -15600,7 +15600,7 @@ index bb1c862411a2..25db4d638cfa 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 475b311fa4c01f4391de90730daf0d1e718f5ada Mon Sep 17 00:00:00 2001
|
|
|
+From 8a72a107fc7ba9bf27295ab263ae7d218821a861 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 14 Jan 2021 16:08:26 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Fix kernel-doc references
|
|
@@ -15637,7 +15637,7 @@ index 25db4d638cfa..52a83a8fcf82 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 9f0cf2d2b5da3a6c3bb040794d295ee99a4ad5b2 Mon Sep 17 00:00:00 2001
|
|
|
+From 2e25eccababb35a7df5e7078af331b1545eb7091 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 26 Jan 2021 18:22:02 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Fix braces in if condition with
|
|
@@ -15700,7 +15700,7 @@ index 74f0faaa2b27..583315db8b02 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From c81c70309a61976d024c2cb898bc16fd19686d63 Mon Sep 17 00:00:00 2001
|
|
|
+From a9118a4d20085508588984edc8d93ef3d09c6fd4 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 11 Feb 2021 13:41:49 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Fix access of unaligned value
|
|
@@ -15740,7 +15740,7 @@ index 583315db8b02..15d96eac6811 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 245b63acc338f0d5998234bab3c5a0039fe8de85 Mon Sep 17 00:00:00 2001
|
|
|
+From c79e18e307808826e6dce7131c727deb9c25d12c Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 03:42:45 +0100
|
|
|
Subject: [PATCH] platform/surface: Set up Surface Aggregator device registry
|
|
@@ -16135,7 +16135,7 @@ index 000000000000..a051d941ad96
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 7ffa29669f90c35561bd0b9131b60f6ad56c7981 Mon Sep 17 00:00:00 2001
|
|
|
+From 55068c44b24b551e8db338ebea187adfaaf6a322 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 04:14:35 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add base device hub
|
|
@@ -16461,7 +16461,7 @@ index a051d941ad96..6c23d75a044c 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 3ef39d45e162a91ef20d41e4584f22213e838ac7 Mon Sep 17 00:00:00 2001
|
|
|
+From 5091d9c2501775903682f1a155b34e6df2acefaf Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 04:55:09 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add battery subsystem
|
|
@@ -16547,7 +16547,7 @@ index 6c23d75a044c..cde279692842 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 7e71870e30d8a2c0539f3c3a97b77d7dfcbcbfa4 Mon Sep 17 00:00:00 2001
|
|
|
+From d640cf19b11b6cd362f33e9e2b3f4ee47c3618c4 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 05:01:08 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add platform profile
|
|
@@ -16646,7 +16646,7 @@ index cde279692842..33904613dd4b 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 813f8ad53117549bfc1dce60b8700cecb76dff89 Mon Sep 17 00:00:00 2001
|
|
|
+From 9eb068b50213c8d57ff7bb360c3e57a54c2768f5 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 05:06:41 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add DTX device
|
|
@@ -16687,7 +16687,7 @@ index 33904613dd4b..dc044d06828b 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 603eba200fad0b5480c15ca0463166f6aee93264 Mon Sep 17 00:00:00 2001
|
|
|
+From b25c456e6bc32c93b667a4c41d225b2af6c09413 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 7 Feb 2021 05:16:44 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add HID subsystem
|
|
@@ -16780,7 +16780,48 @@ index dc044d06828b..caee90d135c5 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From fe31d5f5e6c75f2c6619b3b0b52d5083eaca78da Mon Sep 17 00:00:00 2001
|
|
|
+From 8786955a1f821d5ee4d13b1c19af2541653f2dfb Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Tue, 9 Mar 2021 17:03:15 +0100
|
|
|
+Subject: [PATCH] platform/surface: aggregator_registry: Add support for
|
|
|
+ Surface Pro 7+
|
|
|
+
|
|
|
+The Surface Pro 7+ is essentially a refresh of the Surface Pro 7 with
|
|
|
+updated hardware and a new WSID identifier.
|
|
|
+
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ drivers/platform/surface/surface_aggregator_registry.c | 5 ++++-
|
|
|
+ 1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
+
|
|
|
+diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
+index caee90d135c5..6de74e893d06 100644
|
|
|
+--- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
++++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
+@@ -191,7 +191,7 @@ static const struct software_node *ssam_node_group_sp6[] = {
|
|
|
+ NULL,
|
|
|
+ };
|
|
|
+
|
|
|
+-/* Devices for Surface Pro 7. */
|
|
|
++/* Devices for Surface Pro 7 and Surface Pro 7+. */
|
|
|
+ static const struct software_node *ssam_node_group_sp7[] = {
|
|
|
+ &ssam_node_root,
|
|
|
+ &ssam_node_bat_ac,
|
|
|
+@@ -521,6 +521,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
|
|
+ /* Surface Pro 7 */
|
|
|
+ { "MSHW0116", (unsigned long)ssam_node_group_sp7 },
|
|
|
+
|
|
|
++ /* Surface Pro 7+ */
|
|
|
++ { "MSHW0119", (unsigned long)ssam_node_group_sp7 },
|
|
|
++
|
|
|
+ /* Surface Book 2 */
|
|
|
+ { "MSHW0107", (unsigned long)ssam_node_group_sb2 },
|
|
|
+
|
|
|
+--
|
|
|
+2.30.1
|
|
|
+
|
|
|
+From 83ab20b8c641c93335439bccd9e083bc53596fba Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 9 Feb 2021 02:46:40 +0100
|
|
|
Subject: [PATCH] platform/surface: Add DTX driver
|
|
@@ -18271,7 +18312,7 @@ index 000000000000..0833aab0d819
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 5666bacf4fa214ee9b61767660ee796568ec881a Mon Sep 17 00:00:00 2001
|
|
|
+From cbce4b6b86fda90b9120a0943259d790623714ab Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 9 Feb 2021 02:50:11 +0100
|
|
|
Subject: [PATCH] platform/surface: dtx: Add support for native SSAM devices
|
|
@@ -18412,7 +18453,7 @@ index a95adc1094aa..4bb5d286bf95 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 21ef9d0ead48bb568c3898df5f5b0d99a21977b8 Mon Sep 17 00:00:00 2001
|
|
|
+From 7acdf3f22691ea81328bd4d3fe80c8c9e8914cc5 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 9 Feb 2021 02:55:31 +0100
|
|
|
Subject: [PATCH] docs: driver-api: Add Surface DTX driver documentation
|
|
@@ -19180,7 +19221,7 @@ index 8ea459fc56f4..ba2dfafeb28c 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 1699b3a1c4fadac21f7787d3237eaa636e501a83 Mon Sep 17 00:00:00 2001
|
|
|
+From 1ac0425ccc915648bb5e136f79eff64ae51d8e45 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 11 Feb 2021 20:02:57 +0100
|
|
|
Subject: [PATCH] input: Add bus ID for Surface Aggregator Module
|
|
@@ -19209,7 +19250,7 @@ index 9a61c28ed3ae..3e81ea3d7df2 100644
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From c000bc102bd387084452507a7ce24e01fad471bb Mon Sep 17 00:00:00 2001
|
|
|
+From 28d661771a3edbd8dba2c03b58200021b51b9619 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 11 Feb 2021 20:08:50 +0100
|
|
|
Subject: [PATCH] HID: Add support for Surface Aggregator Module HID transport
|
|
@@ -19952,7 +19993,7 @@ index 000000000000..4b1a7b57e035
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From b50a40d767e1cd4479c879599d4996b4191fa61f Mon Sep 17 00:00:00 2001
|
|
|
+From 06b730bfa7ae353acda87086de464c4430dd21f9 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 11 Feb 2021 20:10:17 +0100
|
|
|
Subject: [PATCH] HID: surface-hid: Add support for legacy keyboard interface
|
|
@@ -19974,8 +20015,9 @@ Patchset: surface-sam
|
|
|
---
|
|
|
drivers/hid/surface-hid/Kconfig | 14 ++
|
|
|
drivers/hid/surface-hid/Makefile | 1 +
|
|
|
- drivers/hid/surface-hid/surface_kbd.c | 303 ++++++++++++++++++++++++++
|
|
|
- 3 files changed, 318 insertions(+)
|
|
|
+ drivers/hid/surface-hid/surface_hid.c | 7 +-
|
|
|
+ drivers/hid/surface-hid/surface_kbd.c | 300 ++++++++++++++++++++++++++
|
|
|
+ 4 files changed, 317 insertions(+), 5 deletions(-)
|
|
|
create mode 100644 drivers/hid/surface-hid/surface_kbd.c
|
|
|
|
|
|
diff --git a/drivers/hid/surface-hid/Kconfig b/drivers/hid/surface-hid/Kconfig
|
|
@@ -20012,12 +20054,34 @@ index 62fc04632d3d..4ae11cf09b25 100644
|
|
|
obj-$(CONFIG_SURFACE_HID_CORE) += surface_hid_core.o
|
|
|
obj-$(CONFIG_SURFACE_HID) += surface_hid.o
|
|
|
+obj-$(CONFIG_SURFACE_KBD) += surface_kbd.o
|
|
|
+diff --git a/drivers/hid/surface-hid/surface_hid.c b/drivers/hid/surface-hid/surface_hid.c
|
|
|
+index e4477c328536..3477b31611ae 100644
|
|
|
+--- a/drivers/hid/surface-hid/surface_hid.c
|
|
|
++++ b/drivers/hid/surface-hid/surface_hid.c
|
|
|
+@@ -157,15 +157,12 @@ static int ssam_hid_get_raw_report(struct surface_hid_device *shid, u8 rprt_id,
|
|
|
+ static u32 ssam_hid_event_fn(struct ssam_event_notifier *nf, const struct ssam_event *event)
|
|
|
+ {
|
|
|
+ struct surface_hid_device *shid = container_of(nf, struct surface_hid_device, notif);
|
|
|
+- int status;
|
|
|
+
|
|
|
+ if (event->command_id != 0x00)
|
|
|
+ return 0;
|
|
|
+
|
|
|
+- status = hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0],
|
|
|
+- event->length, 0);
|
|
|
+-
|
|
|
+- return ssam_notifier_from_errno(status) | SSAM_NOTIF_HANDLED;
|
|
|
++ hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0], event->length, 0);
|
|
|
++ return SSAM_NOTIF_HANDLED;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
diff --git a/drivers/hid/surface-hid/surface_kbd.c b/drivers/hid/surface-hid/surface_kbd.c
|
|
|
new file mode 100644
|
|
|
-index 000000000000..e72baac952ec
|
|
|
+index 000000000000..0635341bc517
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/hid/surface-hid/surface_kbd.c
|
|
|
-@@ -0,0 +1,303 @@
|
|
|
+@@ -0,0 +1,300 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
|
+/*
|
|
|
+ * Surface System Aggregator Module (SSAM) HID transport driver for the legacy
|
|
@@ -20144,7 +20208,6 @@ index 000000000000..e72baac952ec
|
|
|
+static u32 ssam_kbd_event_fn(struct ssam_event_notifier *nf, const struct ssam_event *event)
|
|
|
+{
|
|
|
+ struct surface_hid_device *shid = container_of(nf, struct surface_hid_device, notif);
|
|
|
-+ int status;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Check against device UID manually, as registry and device target
|
|
@@ -20163,10 +20226,8 @@ index 000000000000..e72baac952ec
|
|
|
+ if (!ssam_kbd_is_input_event(event))
|
|
|
+ return 0;
|
|
|
+
|
|
|
-+ status = hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0],
|
|
|
-+ event->length, 0);
|
|
|
-+
|
|
|
-+ return ssam_notifier_from_errno(status) | SSAM_NOTIF_HANDLED;
|
|
|
++ hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0], event->length, 0);
|
|
|
++ return SSAM_NOTIF_HANDLED;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
@@ -20324,7 +20385,7 @@ index 000000000000..e72baac952ec
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 883c16b19d9588593a8fc403bf5cf990a1d4e281 Mon Sep 17 00:00:00 2001
|
|
|
+From ae5f2370627050e0371686a7a1f2bdf17920eddf Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 21:06:12 +0100
|
|
|
Subject: [PATCH] power: supply: Add battery driver for Surface Aggregator
|
|
@@ -20374,10 +20435,10 @@ index d4ebe9f7ae69..b107e059770f 100644
|
|
|
M: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
L: platform-driver-x86@vger.kernel.org
|
|
|
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
|
|
|
-index eec646c568b7..ed132dde0735 100644
|
|
|
+index 1699b9269a78..b635331daba4 100644
|
|
|
--- a/drivers/power/supply/Kconfig
|
|
|
+++ b/drivers/power/supply/Kconfig
|
|
|
-@@ -774,4 +774,20 @@ config RN5T618_POWER
|
|
|
+@@ -775,4 +775,20 @@ config RN5T618_POWER
|
|
|
This driver can also be built as a module. If so, the module will be
|
|
|
called rn5t618_power.
|
|
|
|
|
@@ -21317,7 +21378,7 @@ index 000000000000..327fd7af386b
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From 71bde8d631028d94e2132ba05302af1baf447414 Mon Sep 17 00:00:00 2001
|
|
|
+From 59806be0c63b97b7dd85f0dc99d0c8e11a34b487 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 21:07:17 +0100
|
|
|
Subject: [PATCH] power: supply: Add AC driver for Surface Aggregator Module
|
|
@@ -21359,10 +21420,10 @@ index b107e059770f..2144ec466377 100644
|
|
|
MICROSOFT SURFACE DTX DRIVER
|
|
|
M: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
|
|
|
-index ed132dde0735..d4105228a2a5 100644
|
|
|
+index b635331daba4..d4d756d95778 100644
|
|
|
--- a/drivers/power/supply/Kconfig
|
|
|
+++ b/drivers/power/supply/Kconfig
|
|
|
-@@ -790,4 +790,20 @@ config BATTERY_SURFACE
|
|
|
+@@ -791,4 +791,20 @@ config BATTERY_SURFACE
|
|
|
Microsoft Surface devices, i.e. Surface Pro 7, Surface Laptop 3,
|
|
|
Surface Book 3, and Surface Laptop Go.
|
|
|
|
|
@@ -21697,7 +21758,7 @@ index 000000000000..982f9b9ef6f5
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
-From f983d2631fe3b634dd06198b2da985794a4b1259 Mon Sep 17 00:00:00 2001
|
|
|
+From 543dd0fdf499152300c99786ba28b7de43c3a6ee Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 13 Feb 2021 19:58:50 +0100
|
|
|
Subject: [PATCH] platform/surface: Add performance mode driver
|
|
@@ -21884,3 +21945,516 @@ index 000000000000..3b92a43f8606
|
|
|
--
|
|
|
2.30.1
|
|
|
|
|
|
+From a361586c1ea6a5740e7cf64426d0a7946b57f700 Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Thu, 4 Mar 2021 20:05:24 +0100
|
|
|
+Subject: [PATCH] platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x
|
|
|
+ define static functions
|
|
|
+
|
|
|
+The SSAM_DEFINE_SYNC_REQUEST_x() macros are intended to reduce
|
|
|
+boiler-plate code for SSAM request definitions by defining a wrapper
|
|
|
+function for the specified request. The client device variants of those
|
|
|
+macros, i.e. SSAM_DEFINE_SYNC_REQUEST_CL_x() in particular rely on the
|
|
|
+multi-device (MD) variants, e.g.:
|
|
|
+
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_CL_R(name, rtype, spec...) \
|
|
|
+ SSAM_DEFINE_SYNC_REQUEST_MD_R(__raw_##name, rtype, spec) \
|
|
|
+ int name(struct ssam_device *sdev, rtype *ret) \
|
|
|
+ { \
|
|
|
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
|
|
|
+ sdev->uid.instance, ret); \
|
|
|
+ }
|
|
|
+
|
|
|
+This now creates the problem that it is not possible to declare the
|
|
|
+generated functions static via
|
|
|
+
|
|
|
+ static SSAM_DEFINE_SYNC_REQUEST_CL_R(...)
|
|
|
+
|
|
|
+as this will only apply to the function defined by the multi-device
|
|
|
+macro, i.e. SSAM_DEFINE_SYNC_REQUEST_MD_R(). Thus compiling with
|
|
|
+`-Wmissing-prototypes' rightfully complains that there is a 'static'
|
|
|
+keyword missing.
|
|
|
+
|
|
|
+To solve this, make all SSAM_DEFINE_SYNC_REQUEST_x() macros define
|
|
|
+static functions. Non-client-device macros are also changed for
|
|
|
+consistency. In general, we expect those functions to be only used
|
|
|
+locally in the respective drivers for the corresponding interfaces, so
|
|
|
+having to define a wrapper function to be able to export this should be
|
|
|
+the odd case out.
|
|
|
+
|
|
|
+Reported-by: kernel test robot <lkp@intel.com>
|
|
|
+Fixes: b78b4982d763 ("platform/surface: Add platform profile driver")
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Link: https://lore.kernel.org/r/20210304190524.1172197-1-luzmaximilian@gmail.com
|
|
|
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ .../driver-api/surface_aggregator/client.rst | 4 +-
|
|
|
+ .../platform/surface/aggregator/controller.c | 10 +--
|
|
|
+ .../surface/surface_aggregator_registry.c | 2 +-
|
|
|
+ drivers/platform/surface/surface_dtx.c | 18 ++---
|
|
|
+ drivers/platform/surface/surface_perfmode.c | 4 +-
|
|
|
+ drivers/power/supply/surface_battery.c | 8 +-
|
|
|
+ drivers/power/supply/surface_charger.c | 4 +-
|
|
|
+ include/linux/surface_aggregator/controller.h | 74 +++++++++----------
|
|
|
+ include/linux/surface_aggregator/device.h | 31 ++++----
|
|
|
+ 9 files changed, 78 insertions(+), 77 deletions(-)
|
|
|
+
|
|
|
+diff --git a/Documentation/driver-api/surface_aggregator/client.rst b/Documentation/driver-api/surface_aggregator/client.rst
|
|
|
+index 26d13085a117..e519d374c378 100644
|
|
|
+--- a/Documentation/driver-api/surface_aggregator/client.rst
|
|
|
++++ b/Documentation/driver-api/surface_aggregator/client.rst
|
|
|
+@@ -248,7 +248,7 @@ This example defines a function
|
|
|
+
|
|
|
+ .. code-block:: c
|
|
|
+
|
|
|
+- int __ssam_tmp_perf_mode_set(struct ssam_controller *ctrl, const __le32 *arg);
|
|
|
++ static int __ssam_tmp_perf_mode_set(struct ssam_controller *ctrl, const __le32 *arg);
|
|
|
+
|
|
|
+ executing the specified request, with the controller passed in when calling
|
|
|
+ said function. In this example, the argument is provided via the ``arg``
|
|
|
+@@ -296,7 +296,7 @@ This invocation of the macro defines a function
|
|
|
+
|
|
|
+ .. code-block:: c
|
|
|
+
|
|
|
+- int ssam_bat_get_sta(struct ssam_device *sdev, __le32 *ret);
|
|
|
++ static int ssam_bat_get_sta(struct ssam_device *sdev, __le32 *ret);
|
|
|
+
|
|
|
+ executing the specified request, using the device IDs and controller given
|
|
|
+ in the client device. The full list of such macros for client devices is:
|
|
|
+diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
|
|
|
+index 5bcb59ed579d..aa6f37b4f46e 100644
|
|
|
+--- a/drivers/platform/surface/aggregator/controller.c
|
|
|
++++ b/drivers/platform/surface/aggregator/controller.c
|
|
|
+@@ -1750,35 +1750,35 @@ EXPORT_SYMBOL_GPL(ssam_request_sync_with_buffer);
|
|
|
+
|
|
|
+ /* -- Internal SAM requests. ------------------------------------------------ */
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_get_firmware_version, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_get_firmware_version, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_SAM,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x13,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_off, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_off, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_SAM,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x15,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_on, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_on, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_SAM,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x16,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_exit, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_exit, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_SAM,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x33,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_entry, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_entry, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_SAM,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x34,
|
|
|
+diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
+index 6de74e893d06..c42b97f61a57 100644
|
|
|
+--- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
++++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
+@@ -302,7 +302,7 @@ struct ssam_base_hub {
|
|
|
+ struct ssam_event_notifier notif;
|
|
|
+ };
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_query_opmode, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_query_opmode, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x0d,
|
|
|
+diff --git a/drivers/platform/surface/surface_dtx.c b/drivers/platform/surface/surface_dtx.c
|
|
|
+index 4bb5d286bf95..85451eb94d98 100644
|
|
|
+--- a/drivers/platform/surface/surface_dtx.c
|
|
|
++++ b/drivers/platform/surface/surface_dtx.c
|
|
|
+@@ -69,63 +69,63 @@ struct ssam_bas_base_info {
|
|
|
+
|
|
|
+ static_assert(sizeof(struct ssam_bas_base_info) == 2);
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_lock, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_lock, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x06,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_unlock, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_unlock, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x07,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_request, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_request, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x08,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_confirm, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_confirm, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x09,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_heartbeat, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_heartbeat, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x0a,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_cancel, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_cancel, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x0b,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_base, struct ssam_bas_base_info, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_base, struct ssam_bas_base_info, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x0c,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_device_mode, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_device_mode, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x0d,
|
|
|
+ .instance_id = 0x00,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_latch_status, u8, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_latch_status, u8, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAS,
|
|
|
+ .target_id = 0x01,
|
|
|
+ .command_id = 0x11,
|
|
|
+diff --git a/drivers/platform/surface/surface_perfmode.c b/drivers/platform/surface/surface_perfmode.c
|
|
|
+index 3b92a43f8606..a9114e001d0d 100644
|
|
|
+--- a/drivers/platform/surface/surface_perfmode.c
|
|
|
++++ b/drivers/platform/surface/surface_perfmode.c
|
|
|
+@@ -33,12 +33,12 @@ struct ssam_perf_info {
|
|
|
+ __le16 unknown2;
|
|
|
+ } __packed;
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_tmp_perf_mode_get, struct ssam_perf_info, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_tmp_perf_mode_get, struct ssam_perf_info, {
|
|
|
+ .target_category = SSAM_SSH_TC_TMP,
|
|
|
+ .command_id = 0x02,
|
|
|
+ });
|
|
|
+
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_tmp_perf_mode_set, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_tmp_perf_mode_set, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_TMP,
|
|
|
+ .command_id = 0x03,
|
|
|
+ });
|
|
|
+diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
|
|
|
+index 327fd7af386b..b93a4f556b5c 100644
|
|
|
+--- a/drivers/power/supply/surface_battery.c
|
|
|
++++ b/drivers/power/supply/surface_battery.c
|
|
|
+@@ -85,25 +85,25 @@ static_assert(sizeof(struct spwr_bst) == 16);
|
|
|
+ #define SPWR_BATTERY_VALUE_UNKNOWN 0xffffffff
|
|
|
+
|
|
|
+ /* Get battery status (_STA) */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x01,
|
|
|
+ });
|
|
|
+
|
|
|
+ /* Get battery static information (_BIX). */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bix, struct spwr_bix, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bix, struct spwr_bix, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x02,
|
|
|
+ });
|
|
|
+
|
|
|
+ /* Get battery dynamic information (_BST). */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bst, struct spwr_bst, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bst, struct spwr_bst, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x03,
|
|
|
+ });
|
|
|
+
|
|
|
+ /* Set battery trip point (_BTP). */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_W(ssam_bat_set_btp, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_W(ssam_bat_set_btp, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x04,
|
|
|
+ });
|
|
|
+diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
|
|
|
+index 982f9b9ef6f5..fe484523a2c2 100644
|
|
|
+--- a/drivers/power/supply/surface_charger.c
|
|
|
++++ b/drivers/power/supply/surface_charger.c
|
|
|
+@@ -28,13 +28,13 @@ enum sam_battery_sta {
|
|
|
+ };
|
|
|
+
|
|
|
+ /* Get battery status (_STA). */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x01,
|
|
|
+ });
|
|
|
+
|
|
|
+ /* Get platform power source for battery (_PSR / DPTF PSRC). */
|
|
|
+-static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_psrc, __le32, {
|
|
|
++SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_psrc, __le32, {
|
|
|
+ .target_category = SSAM_SSH_TC_BAT,
|
|
|
+ .command_id = 0x0d,
|
|
|
+ });
|
|
|
+diff --git a/include/linux/surface_aggregator/controller.h b/include/linux/surface_aggregator/controller.h
|
|
|
+index f4b1ba887384..0806796eabcb 100644
|
|
|
+--- a/include/linux/surface_aggregator/controller.h
|
|
|
++++ b/include/linux/surface_aggregator/controller.h
|
|
|
+@@ -344,16 +344,16 @@ struct ssam_request_spec_md {
|
|
|
+ * request has been fully completed. The required transport buffer will be
|
|
|
+ * allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl)``, returning the status of the request, which is zero on success and
|
|
|
+- * negative on failure. The ``ctrl`` parameter is the controller via which the
|
|
|
+- * request is being sent.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl)``, returning the status of the request, which is
|
|
|
++ * zero on success and negative on failure. The ``ctrl`` parameter is the
|
|
|
++ * controller via which the request is being sent.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_N(name, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl) \
|
|
|
++ static int name(struct ssam_controller *ctrl) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+@@ -383,17 +383,17 @@ struct ssam_request_spec_md {
|
|
|
+ * returning once the request has been fully completed. The required transport
|
|
|
+ * buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl, const atype *arg)``, returning the status of the request, which is
|
|
|
+- * zero on success and negative on failure. The ``ctrl`` parameter is the
|
|
|
+- * controller via which the request is sent. The request argument is specified
|
|
|
+- * via the ``arg`` pointer.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl, const atype *arg)``, returning the status of the
|
|
|
++ * request, which is zero on success and negative on failure. The ``ctrl``
|
|
|
++ * parameter is the controller via which the request is sent. The request
|
|
|
++ * argument is specified via the ``arg`` pointer.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_W(name, atype, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl, const atype *arg) \
|
|
|
++ static int name(struct ssam_controller *ctrl, const atype *arg) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+@@ -424,17 +424,17 @@ struct ssam_request_spec_md {
|
|
|
+ * request itself, returning once the request has been fully completed. The
|
|
|
+ * required transport buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl, rtype *ret)``, returning the status of the request, which is zero on
|
|
|
+- * success and negative on failure. The ``ctrl`` parameter is the controller
|
|
|
+- * via which the request is sent. The request's return value is written to the
|
|
|
+- * memory pointed to by the ``ret`` parameter.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl, rtype *ret)``, returning the status of the request,
|
|
|
++ * which is zero on success and negative on failure. The ``ctrl`` parameter is
|
|
|
++ * the controller via which the request is sent. The request's return value is
|
|
|
++ * written to the memory pointed to by the ``ret`` parameter.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_R(name, rtype, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl, rtype *ret) \
|
|
|
++ static int name(struct ssam_controller *ctrl, rtype *ret) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+@@ -483,17 +483,17 @@ struct ssam_request_spec_md {
|
|
|
+ * returning once the request has been fully completed. The required transport
|
|
|
+ * buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl, u8 tid, u8 iid)``, returning the status of the request, which is
|
|
|
+- * zero on success and negative on failure. The ``ctrl`` parameter is the
|
|
|
+- * controller via which the request is sent, ``tid`` the target ID for the
|
|
|
+- * request, and ``iid`` the instance ID.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl, u8 tid, u8 iid)``, returning the status of the
|
|
|
++ * request, which is zero on success and negative on failure. The ``ctrl``
|
|
|
++ * parameter is the controller via which the request is sent, ``tid`` the
|
|
|
++ * target ID for the request, and ``iid`` the instance ID.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_MD_N(name, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl, u8 tid, u8 iid) \
|
|
|
++ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+@@ -524,18 +524,18 @@ struct ssam_request_spec_md {
|
|
|
+ * the request itself, returning once the request has been fully completed.
|
|
|
+ * The required transport buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl, u8 tid, u8 iid, const atype *arg)``, returning the status of the
|
|
|
+- * request, which is zero on success and negative on failure. The ``ctrl``
|
|
|
+- * parameter is the controller via which the request is sent, ``tid`` the
|
|
|
+- * target ID for the request, and ``iid`` the instance ID. The request argument
|
|
|
+- * is specified via the ``arg`` pointer.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg)``, returning the
|
|
|
++ * status of the request, which is zero on success and negative on failure.
|
|
|
++ * The ``ctrl`` parameter is the controller via which the request is sent,
|
|
|
++ * ``tid`` the target ID for the request, and ``iid`` the instance ID. The
|
|
|
++ * request argument is specified via the ``arg`` pointer.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_MD_W(name, atype, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg)\
|
|
|
++ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+@@ -567,18 +567,18 @@ struct ssam_request_spec_md {
|
|
|
+ * execution of the request itself, returning once the request has been fully
|
|
|
+ * completed. The required transport buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_controller
|
|
|
+- * *ctrl, u8 tid, u8 iid, rtype *ret)``, returning the status of the request,
|
|
|
+- * which is zero on success and negative on failure. The ``ctrl`` parameter is
|
|
|
+- * the controller via which the request is sent, ``tid`` the target ID for the
|
|
|
+- * request, and ``iid`` the instance ID. The request's return value is written
|
|
|
+- * to the memory pointed to by the ``ret`` parameter.
|
|
|
++ * The generated function is defined as ``static int name(struct
|
|
|
++ * ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret)``, returning the status
|
|
|
++ * of the request, which is zero on success and negative on failure. The
|
|
|
++ * ``ctrl`` parameter is the controller via which the request is sent, ``tid``
|
|
|
++ * the target ID for the request, and ``iid`` the instance ID. The request's
|
|
|
++ * return value is written to the memory pointed to by the ``ret`` parameter.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_MD_R(name, rtype, spec...) \
|
|
|
+- int name(struct ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret) \
|
|
|
++ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret) \
|
|
|
+ { \
|
|
|
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
|
|
|
+ struct ssam_request rqst; \
|
|
|
+diff --git a/include/linux/surface_aggregator/device.h b/include/linux/surface_aggregator/device.h
|
|
|
+index 02f3e06c0a60..4441ad667c3f 100644
|
|
|
+--- a/include/linux/surface_aggregator/device.h
|
|
|
++++ b/include/linux/surface_aggregator/device.h
|
|
|
+@@ -336,17 +336,18 @@ void ssam_device_driver_unregister(struct ssam_device_driver *d);
|
|
|
+ * request has been fully completed. The required transport buffer will be
|
|
|
+ * allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_device *sdev)``,
|
|
|
+- * returning the status of the request, which is zero on success and negative
|
|
|
+- * on failure. The ``sdev`` parameter specifies both the target device of the
|
|
|
+- * request and by association the controller via which the request is sent.
|
|
|
++ * The generated function is defined as ``static int name(struct ssam_device
|
|
|
++ * *sdev)``, returning the status of the request, which is zero on success and
|
|
|
++ * negative on failure. The ``sdev`` parameter specifies both the target
|
|
|
++ * device of the request and by association the controller via which the
|
|
|
++ * request is sent.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_CL_N(name, spec...) \
|
|
|
+ SSAM_DEFINE_SYNC_REQUEST_MD_N(__raw_##name, spec) \
|
|
|
+- int name(struct ssam_device *sdev) \
|
|
|
++ static int name(struct ssam_device *sdev) \
|
|
|
+ { \
|
|
|
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
|
|
|
+ sdev->uid.instance); \
|
|
|
+@@ -368,19 +369,19 @@ void ssam_device_driver_unregister(struct ssam_device_driver *d);
|
|
|
+ * itself, returning once the request has been fully completed. The required
|
|
|
+ * transport buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_device *sdev,
|
|
|
+- * const atype *arg)``, returning the status of the request, which is zero on
|
|
|
+- * success and negative on failure. The ``sdev`` parameter specifies both the
|
|
|
+- * target device of the request and by association the controller via which
|
|
|
+- * the request is sent. The request's argument is specified via the ``arg``
|
|
|
+- * pointer.
|
|
|
++ * The generated function is defined as ``static int name(struct ssam_device
|
|
|
++ * *sdev, const atype *arg)``, returning the status of the request, which is
|
|
|
++ * zero on success and negative on failure. The ``sdev`` parameter specifies
|
|
|
++ * both the target device of the request and by association the controller via
|
|
|
++ * which the request is sent. The request's argument is specified via the
|
|
|
++ * ``arg`` pointer.
|
|
|
+ *
|
|
|
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
|
|
|
+ * the generated function.
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_CL_W(name, atype, spec...) \
|
|
|
+ SSAM_DEFINE_SYNC_REQUEST_MD_W(__raw_##name, atype, spec) \
|
|
|
+- int name(struct ssam_device *sdev, const atype *arg) \
|
|
|
++ static int name(struct ssam_device *sdev, const atype *arg) \
|
|
|
+ { \
|
|
|
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
|
|
|
+ sdev->uid.instance, arg); \
|
|
|
+@@ -402,8 +403,8 @@ void ssam_device_driver_unregister(struct ssam_device_driver *d);
|
|
|
+ * itself, returning once the request has been fully completed. The required
|
|
|
+ * transport buffer will be allocated on the stack.
|
|
|
+ *
|
|
|
+- * The generated function is defined as ``int name(struct ssam_device *sdev,
|
|
|
+- * rtype *ret)``, returning the status of the request, which is zero on
|
|
|
++ * The generated function is defined as ``static int name(struct ssam_device
|
|
|
++ * *sdev, rtype *ret)``, returning the status of the request, which is zero on
|
|
|
+ * success and negative on failure. The ``sdev`` parameter specifies both the
|
|
|
+ * target device of the request and by association the controller via which
|
|
|
+ * the request is sent. The request's return value is written to the memory
|
|
|
+@@ -414,7 +415,7 @@ void ssam_device_driver_unregister(struct ssam_device_driver *d);
|
|
|
+ */
|
|
|
+ #define SSAM_DEFINE_SYNC_REQUEST_CL_R(name, rtype, spec...) \
|
|
|
+ SSAM_DEFINE_SYNC_REQUEST_MD_R(__raw_##name, rtype, spec) \
|
|
|
+- int name(struct ssam_device *sdev, rtype *ret) \
|
|
|
++ static int name(struct ssam_device *sdev, rtype *ret) \
|
|
|
+ { \
|
|
|
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
|
|
|
+ sdev->uid.instance, ret); \
|
|
|
+--
|
|
|
+2.30.1
|
|
|
+
|