Update v4.19 patches

Changes:
  SAM:
    - Bugfix: Fix HID input for Surface Laptop 3. The driver now separates
      devices by IID, using the same behavior as on the Surface Book 3.
    - Bugfix: Minor fixes in SSH driver message system.

Links:
- kernel: c5f2f3b76d
- SAM: 99b0243136
This commit is contained in:
Maximilian Luz 2020-07-15 22:16:46 +02:00
parent 5b065fd9da
commit de9de98b9e
No known key found for this signature in database
GPG key ID: 70EC0937F6C26F02
4 changed files with 49 additions and 33 deletions

View file

@ -1,4 +1,4 @@
From b060f8f79b2425879cd27b4cadacea68765e5a82 Mon Sep 17 00:00:00 2001
From 94e62231d05dc74e0e2cc76d8fbc752a84ff91b1 Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Mon, 26 Aug 2019 01:15:40 +0200
Subject: [PATCH 5/8] surface-sam
@ -14,19 +14,19 @@ Subject: [PATCH 5/8] surface-sam
.../x86/surface_sam/surface_sam_hps.c | 1297 +++++
.../x86/surface_sam/surface_sam_san.c | 913 +++
.../x86/surface_sam/surface_sam_san.h | 30 +
.../x86/surface_sam/surface_sam_sid.c | 262 +
.../x86/surface_sam/surface_sam_sid.c | 281 +
.../x86/surface_sam/surface_sam_sid_gpelid.c | 232 +
.../surface_sam/surface_sam_sid_perfmode.c | 216 +
.../x86/surface_sam/surface_sam_sid_power.c | 1154 ++++
.../x86/surface_sam/surface_sam_sid_power.h | 15 +
.../x86/surface_sam/surface_sam_sid_vhf.c | 432 ++
.../x86/surface_sam/surface_sam_sid_vhf.h | 13 +
.../x86/surface_sam/surface_sam_ssh.c | 5115 +++++++++++++++++
.../x86/surface_sam/surface_sam_ssh.c | 5112 +++++++++++++++++
.../x86/surface_sam/surface_sam_ssh.h | 482 ++
.../x86/surface_sam/surface_sam_ssh_trace.h | 536 ++
.../x86/surface_sam/surface_sam_vhf.c | 261 +
drivers/tty/serdev/core.c | 110 +-
22 files changed, 11839 insertions(+), 29 deletions(-)
22 files changed, 11855 insertions(+), 29 deletions(-)
create mode 100644 drivers/platform/x86/surface_sam/Kconfig
create mode 100644 drivers/platform/x86/surface_sam/Makefile
create mode 100644 drivers/platform/x86/surface_sam/surface_sam_dtx.c
@ -3180,10 +3180,10 @@ index 0000000000000..2b9dee159bbbc
+#endif /* _SURFACE_SAM_SAN_H */
diff --git a/drivers/platform/x86/surface_sam/surface_sam_sid.c b/drivers/platform/x86/surface_sam/surface_sam_sid.c
new file mode 100644
index 0000000000000..0dae6569b4265
index 0000000000000..caa2e6446b5f4
--- /dev/null
+++ b/drivers/platform/x86/surface_sam/surface_sam_sid.c
@@ -0,0 +1,262 @@
@@ -0,0 +1,281 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Surface Integration Driver.
@ -3215,27 +3215,22 @@ index 0000000000000..0dae6569b4265
+};
+
+
+static const struct ssam_hid_properties ssam_hid_props_sl3 = {
+ .registry = SSAM_EVENT_REGISTRY_REG, // TODO: needs confirmation
+ .instance = 0,
+};
+
+static const struct ssam_hid_properties ssam_hid_props_sb3_keyboard = {
+static const struct ssam_hid_properties ssam_hid_props_keyboard = {
+ .registry = SSAM_EVENT_REGISTRY_REG,
+ .instance = 1,
+};
+
+static const struct ssam_hid_properties ssam_hid_props_sb3_touchpad = {
+static const struct ssam_hid_properties ssam_hid_props_touchpad = {
+ .registry = SSAM_EVENT_REGISTRY_REG,
+ .instance = 3,
+};
+
+static const struct ssam_hid_properties ssam_hid_props_sb3_iid5 = {
+static const struct ssam_hid_properties ssam_hid_props_iid5 = {
+ .registry = SSAM_EVENT_REGISTRY_REG,
+ .instance = 5,
+};
+
+static const struct ssam_hid_properties ssam_hid_props_sb3_iid6 = {
+static const struct ssam_hid_properties ssam_hid_props_iid6 = {
+ .registry = SSAM_EVENT_REGISTRY_REG,
+ .instance = 6,
+};
@ -3296,25 +3291,25 @@ index 0000000000000..0dae6569b4265
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 1,
+ .platform_data = (void *)&ssam_hid_props_sb3_keyboard,
+ .platform_data = (void *)&ssam_hid_props_keyboard,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 3,
+ .platform_data = (void *)&ssam_hid_props_sb3_touchpad,
+ .platform_data = (void *)&ssam_hid_props_touchpad,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 5,
+ .platform_data = (void *)&ssam_hid_props_sb3_iid5,
+ .platform_data = (void *)&ssam_hid_props_iid5,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 6,
+ .platform_data = (void *)&ssam_hid_props_sb3_iid6,
+ .platform_data = (void *)&ssam_hid_props_iid6,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ { },
@ -3342,8 +3337,20 @@ index 0000000000000..0dae6569b4265
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = -1,
+ .platform_data = (void *)&ssam_hid_props_sl3,
+ .id = 1,
+ .platform_data = (void *)&ssam_hid_props_keyboard,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 3,
+ .platform_data = (void *)&ssam_hid_props_touchpad,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 5,
+ .platform_data = (void *)&ssam_hid_props_iid5,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ { },
@ -3360,8 +3367,20 @@ index 0000000000000..0dae6569b4265
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = -1,
+ .platform_data = (void *)&ssam_hid_props_sl3,
+ .id = 1,
+ .platform_data = (void *)&ssam_hid_props_keyboard,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 3,
+ .platform_data = (void *)&ssam_hid_props_touchpad,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ {
+ .name = "surface_sam_sid_vhf",
+ .id = 5,
+ .platform_data = (void *)&ssam_hid_props_iid5,
+ .pdata_size = sizeof(struct ssam_hid_properties),
+ },
+ { },
@ -5546,10 +5565,10 @@ index 0000000000000..eb55485ccb119
+#endif /* _SURFACE_SAM_SID_VHF_H */
diff --git a/drivers/platform/x86/surface_sam/surface_sam_ssh.c b/drivers/platform/x86/surface_sam/surface_sam_ssh.c
new file mode 100644
index 0000000000000..ecc49e139eb8e
index 0000000000000..ef1ce8cd7d7f2
--- /dev/null
+++ b/drivers/platform/x86/surface_sam/surface_sam_ssh.c
@@ -0,0 +1,5115 @@
@@ -0,0 +1,5112 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Surface Serial Hub (SSH) driver for communication with the Surface/System
@ -6909,10 +6928,8 @@ index 0000000000000..ecc49e139eb8e
+ * If we are cancelling or completing this packet, ignore it.
+ * It's going to be removed from this queue shortly.
+ */
+ if (test_bit(SSH_PACKET_SF_LOCKED_BIT, &p->state)) {
+ spin_unlock(&ptl->queue.lock);
+ if (test_bit(SSH_PACKET_SF_LOCKED_BIT, &p->state))
+ continue;
+ }
+
+ /*
+ * Packets should be ordered non-blocking/to-be-resent first.
@ -6920,7 +6937,6 @@ index 0000000000000..ecc49e139eb8e
+ * process any following packet either and abort.
+ */
+ if (!ssh_ptl_tx_can_process(p)) {
+ spin_unlock(&ptl->queue.lock);
+ packet = ERR_PTR(-EBUSY);
+ break;
+ }
@ -8905,7 +8921,7 @@ index 0000000000000..ecc49e139eb8e
+
+ packet_args.type = SSH_PACKET_TY_BLOCKING;
+ if (!(flags & SSAM_REQUEST_UNSEQUENCED))
+ packet_args.type = SSH_PACKET_TY_SEQUENCED;
+ packet_args.type |= SSH_PACKET_TY_SEQUENCED;
+
+ packet_args.priority = SSH_PACKET_PRIORITY(DATA, 0);
+ packet_args.ops = &ssh_rtl_packet_ops;

View file

@ -1,4 +1,4 @@
From ebd1924d3df86997fb2ddbaf0e883745546b230c Mon Sep 17 00:00:00 2001
From 045d078505d3bbd4b8632251c718aa4dac59e085 Mon Sep 17 00:00:00 2001
From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com>
Date: Sat, 28 Sep 2019 17:48:21 +0200
Subject: [PATCH 6/8] suspend

View file

@ -1,4 +1,4 @@
From c5eaac134e67ec8bebfe7750e90ea68bdb4f3b92 Mon Sep 17 00:00:00 2001
From 5ab23410ddbe3088444af99d1296a4164365fc70 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:58:17 +0200
Subject: [PATCH 7/8] ipts

View file

@ -1,4 +1,4 @@
From d9be3c8242ffa52ae091be0bdac579cf1f8c6f9e Mon Sep 17 00:00:00 2001
From 1177844a912a96fad44a13c59c36839f8aaa05e1 Mon Sep 17 00:00:00 2001
From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com>
Date: Thu, 20 Feb 2020 16:51:11 +0900
Subject: [PATCH 8/8] wifi