|
@@ -1,4 +1,4 @@
|
|
|
-From b904ea6343ad35542dd2c77da8f9e9cef0f93737 Mon Sep 17 00:00:00 2001
|
|
|
+From c551c8c87815fc368360086fd4210d9240ea8007 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:23:53 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Improve documentation and
|
|
@@ -261,7 +261,7 @@ index 45501b6e54e8..5c4ae1a26183 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From e69504d11228b8c277ec13dabb2cdbf638bd2818 Mon Sep 17 00:00:00 2001
|
|
|
+From 7f6fee1201df8ad9226b4de906c251598ea1e828 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:30:58 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Ignore command messages not
|
|
@@ -334,7 +334,7 @@ index f5565570f16c..90634dcacabf 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From febd0871501c2caf6b7e5a156b9d8218a9a69926 Mon Sep 17 00:00:00 2001
|
|
|
+From 61e2663e29a78ca0f60c5ba4a99ddd7761a5b7e5 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:42:19 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add target and source IDs to
|
|
@@ -528,7 +528,7 @@ index 2a2c17771d01..55cc61bba1da 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From bb3a83ac2d4e4a7151a16a5ca4760b8031195c01 Mon Sep 17 00:00:00 2001
|
|
|
+From 808a6cbe64c6d5a8385c400ab37da4451a3377da Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:32:16 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_hub: Use target-ID enum instead
|
|
@@ -568,7 +568,7 @@ index 43061514be38..62f27cdb6ca8 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From 347e72d74f926a14dd32b98d50ed9089772dabfb Mon Sep 17 00:00:00 2001
|
|
|
+From 70a966b9dccbe5832648f486eddd8a2e9808033b Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:33:26 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Use target-ID enum
|
|
@@ -617,7 +617,7 @@ index 27d95a6a7851..bd8cd453c393 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From 84f9a75cd7e51ee52860e620958d811abafe79fc Mon Sep 17 00:00:00 2001
|
|
|
+From 132d5c0de71d25479d11387696d771570438ae6e Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:34:06 +0100
|
|
|
Subject: [PATCH] platform/surface: dtx: Use target-ID enum instead of
|
|
@@ -712,7 +712,7 @@ index ed36944467f9..0de76a784a35 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From cdcf418132286d93f4cec1cc25c07afb4a2d8556 Mon Sep 17 00:00:00 2001
|
|
|
+From f010e6760bdfcf0224b0c8fd1a7855fa5d64c1ac Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:40:06 +0100
|
|
|
Subject: [PATCH] HID: surface-hid: Use target-ID enum instead of hard-coding
|
|
@@ -743,7 +743,7 @@ index 0635341bc517..42933bf3e925 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From ae02e8a46ec56484c66edddfb8e36dfef8f53754 Mon Sep 17 00:00:00 2001
|
|
|
+From 41453dfba5bc6ab19769fdda663d3b8f1172b1ae Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:45:28 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Enforce use of target-ID enum
|
|
@@ -975,7 +975,7 @@ index 46c45d1b6368..4da20b7a0ee5 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From 9667473df15e2d92e28ccc2274156df4d70b921b Mon Sep 17 00:00:00 2001
|
|
|
+From 9da775f8454ca4370a2d259d40cee2b10558603d Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 5 Nov 2022 21:46:37 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Fix target-ID of
|
|
@@ -1007,7 +1007,7 @@ index 6abd1efe2088..8b8b80228c14 100644
|
|
|
};
|
|
|
MODULE_DEVICE_TABLE(ssam, ssam_hub_match);
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-index 585911020cea..3afe293ac114 100644
|
|
|
+index 023f126121d7..296f72d52e6a 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
@@ -46,7 +46,7 @@ static const struct software_node ssam_node_hub_kip = {
|
|
@@ -1022,224 +1022,3 @@ index 585911020cea..3afe293ac114 100644
|
|
|
--
|
|
|
2.38.1
|
|
|
|
|
|
-From c151978f37d212f78d6776dfcdff5bfde2b48d98 Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Wed, 9 Nov 2022 13:13:12 +0100
|
|
|
-Subject: [PATCH] wip! platform/surface: aggregator_registry: Add preliminary
|
|
|
- support for Surface Pro 9
|
|
|
-
|
|
|
-Adds support for battery and charger status, as well as platform profile
|
|
|
-and internal HID devices. Support for type-cover HID devices is still
|
|
|
-missing, requiring validation.
|
|
|
-
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- .../surface/surface_aggregator_registry.c | 17 +++++++++++++++++
|
|
|
- 1 file changed, 17 insertions(+)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-index 3afe293ac114..443fe7647315 100644
|
|
|
---- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-+++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-@@ -268,6 +268,7 @@ static const struct software_node *ssam_node_group_sp7[] = {
|
|
|
- NULL,
|
|
|
- };
|
|
|
-
|
|
|
-+/* Devices for Surface Pro 8 */
|
|
|
- static const struct software_node *ssam_node_group_sp8[] = {
|
|
|
- &ssam_node_root,
|
|
|
- &ssam_node_hub_kip,
|
|
|
-@@ -284,6 +285,19 @@ static const struct software_node *ssam_node_group_sp8[] = {
|
|
|
- NULL,
|
|
|
- };
|
|
|
-
|
|
|
-+/* Devices for Surface Pro 9 */
|
|
|
-+static const struct software_node *ssam_node_group_sp9[] = {
|
|
|
-+ &ssam_node_root,
|
|
|
-+ &ssam_node_hub_kip,
|
|
|
-+ &ssam_node_bat_ac,
|
|
|
-+ &ssam_node_bat_main,
|
|
|
-+ &ssam_node_tmp_pprof,
|
|
|
-+ /* TODO: typecover/KIP devices, we can likely reuse the SP8 node but need validation */
|
|
|
-+ &ssam_node_hid_sam_sensors,
|
|
|
-+ &ssam_node_hid_sam_ucm_ucsi,
|
|
|
-+ NULL,
|
|
|
-+};
|
|
|
-+
|
|
|
-
|
|
|
- /* -- SSAM platform/meta-hub driver. ---------------------------------------- */
|
|
|
-
|
|
|
-@@ -303,6 +317,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
|
|
- /* Surface Pro 8 */
|
|
|
- { "MSHW0263", (unsigned long)ssam_node_group_sp8 },
|
|
|
-
|
|
|
-+ /* Surface Pro 9 */
|
|
|
-+ { "MSHW0343", (unsigned long)ssam_node_group_sp9 },
|
|
|
-+
|
|
|
- /* Surface Book 2 */
|
|
|
- { "MSHW0107", (unsigned long)ssam_node_group_gen5 },
|
|
|
-
|
|
|
---
|
|
|
-2.38.1
|
|
|
-
|
|
|
-From 6a846887034568d75966664d6a260fb1f9f70da5 Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Sat, 12 Nov 2022 22:51:26 +0100
|
|
|
-Subject: [PATCH] wip! platform/surface: aggregator_registry: Add preliminary
|
|
|
- typecover support for Surface Pro 9
|
|
|
-
|
|
|
-Still missing: Tablet mode switch.
|
|
|
-
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- drivers/platform/surface/surface_aggregator_registry.c | 6 +++++-
|
|
|
- 1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-index 443fe7647315..58ad4cad445c 100644
|
|
|
---- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-+++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-@@ -292,7 +292,11 @@ static const struct software_node *ssam_node_group_sp9[] = {
|
|
|
- &ssam_node_bat_ac,
|
|
|
- &ssam_node_bat_main,
|
|
|
- &ssam_node_tmp_pprof,
|
|
|
-- /* TODO: typecover/KIP devices, we can likely reuse the SP8 node but need validation */
|
|
|
-+ /* TODO: POS tablet mode switch */
|
|
|
-+ &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,
|
|
|
---
|
|
|
-2.38.1
|
|
|
-
|
|
|
-From 1ffe56fc2014d26ef730455b4d3956bd4845f521 Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Sun, 13 Nov 2022 11:38:58 +0100
|
|
|
-Subject: [PATCH] wip! platform/surface: aggregator: Do not check for repeated
|
|
|
- unsequenced packets
|
|
|
-
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- .../surface/aggregator/ssh_packet_layer.c | 25 ++++++++++++++++---
|
|
|
- 1 file changed, 21 insertions(+), 4 deletions(-)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/aggregator/ssh_packet_layer.c b/drivers/platform/surface/aggregator/ssh_packet_layer.c
|
|
|
-index 6748fe4ac5d5..e0d5b18ade0b 100644
|
|
|
---- a/drivers/platform/surface/aggregator/ssh_packet_layer.c
|
|
|
-+++ b/drivers/platform/surface/aggregator/ssh_packet_layer.c
|
|
|
-@@ -1596,16 +1596,33 @@ static void ssh_ptl_timeout_reap(struct work_struct *work)
|
|
|
- ssh_ptl_tx_wakeup_packet(ptl);
|
|
|
- }
|
|
|
-
|
|
|
--static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq)
|
|
|
-+static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl,
|
|
|
-+ const struct ssh_frame *frame)
|
|
|
- {
|
|
|
- int i;
|
|
|
-
|
|
|
-+ /*
|
|
|
-+ * Ignore unsequenced packets. On some devices (notably Surface Pro 9),
|
|
|
-+ * unsequenced events will always be sent with SEQ=0x00. Attempting to
|
|
|
-+ * detect re-transmission would thus just block all events.
|
|
|
-+ *
|
|
|
-+ * While sequence numbers would also allow detection of re-transmitted
|
|
|
-+ * packets in unsequenced communication, they have only ever been used
|
|
|
-+ * to cover edge-cases in sequenced transmission. In particular, the
|
|
|
-+ * only instance of packets being retransmitted (that we are aware of)
|
|
|
-+ * is due to an ACK timeout. As this does not happen in unsequenced
|
|
|
-+ * communication, skip the re-transmission check for those packets
|
|
|
-+ * entirely.
|
|
|
-+ */
|
|
|
-+ if (frame->type == SSH_FRAME_TYPE_DATA_NSQ)
|
|
|
-+ return false;
|
|
|
-+
|
|
|
- /*
|
|
|
- * Check if SEQ has been seen recently (i.e. packet was
|
|
|
- * re-transmitted and we should ignore it).
|
|
|
- */
|
|
|
- for (i = 0; i < ARRAY_SIZE(ptl->rx.blocked.seqs); i++) {
|
|
|
-- if (likely(ptl->rx.blocked.seqs[i] != seq))
|
|
|
-+ if (likely(ptl->rx.blocked.seqs[i] != frame->seq))
|
|
|
- continue;
|
|
|
-
|
|
|
- ptl_dbg(ptl, "ptl: ignoring repeated data packet\n");
|
|
|
-@@ -1613,7 +1630,7 @@ static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq)
|
|
|
- }
|
|
|
-
|
|
|
- /* Update list of blocked sequence IDs. */
|
|
|
-- ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = seq;
|
|
|
-+ ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = frame->seq;
|
|
|
- ptl->rx.blocked.offset = (ptl->rx.blocked.offset + 1)
|
|
|
- % ARRAY_SIZE(ptl->rx.blocked.seqs);
|
|
|
-
|
|
|
-@@ -1624,7 +1641,7 @@ static void ssh_ptl_rx_dataframe(struct ssh_ptl *ptl,
|
|
|
- const struct ssh_frame *frame,
|
|
|
- const struct ssam_span *payload)
|
|
|
- {
|
|
|
-- if (ssh_ptl_rx_retransmit_check(ptl, frame->seq))
|
|
|
-+ if (ssh_ptl_rx_retransmit_check(ptl, frame))
|
|
|
- return;
|
|
|
-
|
|
|
- ptl->ops.data_received(ptl, payload);
|
|
|
---
|
|
|
-2.38.1
|
|
|
-
|
|
|
-From b7935e19a005ed9a4651cc85118ebbb1a67fd11a Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Sun, 13 Nov 2022 20:47:28 +0100
|
|
|
-Subject: [PATCH] wip! platform/surface: aggregator_registry: Add support for
|
|
|
- Surface Laptop 5
|
|
|
-
|
|
|
-Add device nodes to enable support for battery and charger status, the
|
|
|
-ACPI platform profile, as well as internal HID devices (including
|
|
|
-touchpad and keyboard) on the Surface Laptop 5.
|
|
|
-
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- .../surface/surface_aggregator_registry.c | 16 ++++++++++++++++
|
|
|
- 1 file changed, 16 insertions(+)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-index 58ad4cad445c..c01f17227d8f 100644
|
|
|
---- a/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-+++ b/drivers/platform/surface/surface_aggregator_registry.c
|
|
|
-@@ -234,6 +234,19 @@ static const struct software_node *ssam_node_group_sl3[] = {
|
|
|
- NULL,
|
|
|
- };
|
|
|
-
|
|
|
-+/* 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,
|
|
|
-+ &ssam_node_tmp_pprof,
|
|
|
-+ &ssam_node_hid_main_keyboard,
|
|
|
-+ &ssam_node_hid_main_touchpad,
|
|
|
-+ &ssam_node_hid_main_iid5,
|
|
|
-+ &ssam_node_hid_sam_ucm_ucsi,
|
|
|
-+ NULL,
|
|
|
-+};
|
|
|
-+
|
|
|
- /* Devices for Surface Laptop Studio. */
|
|
|
- static const struct software_node *ssam_node_group_sls[] = {
|
|
|
- &ssam_node_root,
|
|
|
-@@ -345,6 +358,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
|
|
- /* Surface Laptop 4 (13", Intel) */
|
|
|
- { "MSHW0250", (unsigned long)ssam_node_group_sl3 },
|
|
|
-
|
|
|
-+ /* Surface Laptop 5 */
|
|
|
-+ { "MSHW0350", (unsigned long)ssam_node_group_sl5 },
|
|
|
-+
|
|
|
- /* Surface Laptop Go 1 */
|
|
|
- { "MSHW0118", (unsigned long)ssam_node_group_slg1 },
|
|
|
-
|
|
|
---
|
|
|
-2.38.1
|
|
|
-
|