|
@@ -1,4 +1,4 @@
|
|
|
-From cdcc4fcfc822b15b7cb635f98a20a8236ce14f58 Mon Sep 17 00:00:00 2001
|
|
|
+From c68392901656ff8018ba824f719217a47214d16c Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:20 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Improve documentation and
|
|
@@ -115,7 +115,7 @@ index bf007d6c9873..18fd0f0aee84 100644
|
|
|
|
|
|
Limitations and Observations
|
|
|
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
|
|
|
-index c6537a1b3a2e..2c99f51ccd4e 100644
|
|
|
+index 30cea324ff95..cb8676062276 100644
|
|
|
--- a/drivers/platform/surface/aggregator/controller.c
|
|
|
+++ b/drivers/platform/surface/aggregator/controller.c
|
|
|
@@ -994,7 +994,7 @@ static void ssam_handle_event(struct ssh_rtl *rtl,
|
|
@@ -289,7 +289,7 @@ index 45501b6e54e8..5c4ae1a26183 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 97cc96756687e7e12594c4471fd812c8cb8cb697 Mon Sep 17 00:00:00 2001
|
|
|
+From 43d7104b38e89cde89507b6aee7bf20984ba5dd7 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:21 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add target and source IDs to
|
|
@@ -486,7 +486,7 @@ index 2a2c17771d01..55cc61bba1da 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From c38f3f5d53778cbecb06a5426557f36bc614e53e Mon Sep 17 00:00:00 2001
|
|
|
+From 3138b7f685af1579e7c9fe47363d34c3bdcea73a Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:22 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_hub: Use target-ID enum instead
|
|
@@ -529,7 +529,7 @@ index 43061514be38..62f27cdb6ca8 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 02e7a709fe4a152df5a7472a8a220f1bf9b9ffb4 Mon Sep 17 00:00:00 2001
|
|
|
+From a659ee28a64ab652b1ca285d286db28bcec047d3 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:23 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Use target-ID enum
|
|
@@ -548,10 +548,10 @@ Patchset: surface-sam
|
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index 27d95a6a7851..bd8cd453c393 100644
|
|
|
+index af8b547cffdc..c8ecbdbb516c 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-@@ -247,7 +247,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s
|
|
|
+@@ -252,7 +252,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s
|
|
|
|
|
|
SSAM_DEFINE_SYNC_REQUEST_R(__ssam_kip_get_cover_state, u8, {
|
|
|
.target_category = SSAM_SSH_TC_KIP,
|
|
@@ -560,7 +560,7 @@ index 27d95a6a7851..bd8cd453c393 100644
|
|
|
.command_id = 0x1d,
|
|
|
.instance_id = 0x00,
|
|
|
});
|
|
|
-@@ -371,7 +371,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour
|
|
|
+@@ -376,7 +376,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour
|
|
|
int status;
|
|
|
|
|
|
rqst.target_category = SSAM_SSH_TC_POS;
|
|
@@ -569,7 +569,7 @@ index 27d95a6a7851..bd8cd453c393 100644
|
|
|
rqst.command_id = 0x01;
|
|
|
rqst.instance_id = 0x00;
|
|
|
rqst.flags = SSAM_REQUEST_HAS_RESPONSE;
|
|
|
-@@ -430,7 +430,7 @@ static int ssam_pos_get_source(struct ssam_tablet_sw *sw, u32 *source_id)
|
|
|
+@@ -435,7 +435,7 @@ static int ssam_pos_get_source(struct ssam_tablet_sw *sw, u32 *source_id)
|
|
|
|
|
|
SSAM_DEFINE_SYNC_REQUEST_WR(__ssam_pos_get_posture_for_source, __le32, __le32, {
|
|
|
.target_category = SSAM_SSH_TC_POS,
|
|
@@ -581,7 +581,7 @@ index 27d95a6a7851..bd8cd453c393 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 9ad842718f1117da39fbfdb0cdc104cc602c3557 Mon Sep 17 00:00:00 2001
|
|
|
+From 004019200d47d7a6b3b90e1128a2feab47180a62 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:24 +0100
|
|
|
Subject: [PATCH] platform/surface: dtx: Use target-ID enum instead of
|
|
@@ -679,7 +679,7 @@ index ed36944467f9..0de76a784a35 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 07d5eacb030f2f2c4fd914ed1358adc71b3e4957 Mon Sep 17 00:00:00 2001
|
|
|
+From d26f052a12f2c13ba6fb22b7dff3c2b38b7330b4 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:25 +0100
|
|
|
Subject: [PATCH] HID: surface-hid: Use target-ID enum instead of hard-coding
|
|
@@ -713,7 +713,7 @@ index 0635341bc517..42933bf3e925 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 67338b787269acb3d02c7031ddfd3bda7782a2e6 Mon Sep 17 00:00:00 2001
|
|
|
+From dc6e98165bea8d72cfa1db7f760d9085ce5fdd65 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:26 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Enforce use of target-ID enum
|
|
@@ -775,10 +775,10 @@ index 62f27cdb6ca8..6abd1efe2088 100644
|
|
|
};
|
|
|
MODULE_DEVICE_TABLE(ssam, ssam_hub_match);
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index bd8cd453c393..6147aa887939 100644
|
|
|
+index c8ecbdbb516c..6917e86062bc 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-@@ -510,8 +510,8 @@ static const struct ssam_tablet_sw_desc ssam_pos_sw_desc = {
|
|
|
+@@ -515,8 +515,8 @@ static const struct ssam_tablet_sw_desc ssam_pos_sw_desc = {
|
|
|
/* -- Driver registration. -------------------------------------------------- */
|
|
|
|
|
|
static const struct ssam_device_id ssam_tablet_sw_match[] = {
|
|
@@ -949,7 +949,7 @@ index 46c45d1b6368..4da20b7a0ee5 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 766f905ad53ff0342c7cb29040e4868e4e39beef Mon Sep 17 00:00:00 2001
|
|
|
+From 75f2e0ec35c1eb688acb03058ca45c2d11116b14 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:27 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Fix target-ID of
|
|
@@ -1004,7 +1004,7 @@ index 023f126121d7..296f72d52e6a 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From e2a5061c7057a95f8cb9cc6c1725736f984ef889 Mon Sep 17 00:00:00 2001
|
|
|
+From 5b2f6bcb8a79399d87fb3d738fdad00ab1dc3821 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 20 Dec 2022 18:56:08 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Rename top-level request
|
|
@@ -1176,7 +1176,7 @@ index b501a79f2a08..da0baba5ed51 100644
|
|
|
* Note that for this to work, the controller has to be a parent device.
|
|
|
* If it is not a direct parent, care has to be taken that the device is
|
|
|
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
|
|
|
-index 2c99f51ccd4e..535581c0471c 100644
|
|
|
+index cb8676062276..7fc602e01487 100644
|
|
|
--- a/drivers/platform/surface/aggregator/controller.c
|
|
|
+++ b/drivers/platform/surface/aggregator/controller.c
|
|
|
@@ -1674,7 +1674,7 @@ int ssam_request_sync_submit(struct ssam_controller *ctrl,
|
|
@@ -1296,10 +1296,10 @@ index 492c82e69182..07f0ed658369 100644
|
|
|
goto out;
|
|
|
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index 6147aa887939..9fed800c7cc0 100644
|
|
|
+index 6917e86062bc..a18e9fc7896b 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-@@ -382,7 +382,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour
|
|
|
+@@ -387,7 +387,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour
|
|
|
rsp.length = 0;
|
|
|
rsp.pointer = (u8 *)sources;
|
|
|
|
|
@@ -1551,7 +1551,7 @@ index 4da20b7a0ee5..1545e5567b15 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 7c0951f95bd6501084983e1eb30e82b99d797328 Mon Sep 17 00:00:00 2001
|
|
|
+From 1a1347f32f9411a14066d2196ebd903128aacbca Mon Sep 17 00:00:00 2001
|
|
|
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
Date: Wed, 18 Jan 2023 11:38:23 +0200
|
|
|
Subject: [PATCH] platform/surface: Switch to use acpi_evaluate_dsm_typed()
|
|
@@ -1607,7 +1607,7 @@ index f004a2495201..7b6d887dccdb 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From abd48495bb9172ca0a9a3467bfe06f8c2a0dc032 Mon Sep 17 00:00:00 2001
|
|
|
+From 22751609d0da9e1b927152aad76015170cae0c66 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 4 Mar 2023 20:09:36 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Properly handle
|
|
@@ -1634,7 +1634,7 @@ Patchset: surface-sam
|
|
|
1 file changed, 84 insertions(+), 39 deletions(-)
|
|
|
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index 9fed800c7cc0..e8682f52558f 100644
|
|
|
+index a18e9fc7896b..f9a58db6afde 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
@@ -20,16 +20,23 @@
|
|
@@ -1721,8 +1721,8 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
input_set_capability(sw->mode_switch, EV_SW, SW_TABLET_MODE);
|
|
|
input_report_switch(sw->mode_switch, SW_TABLET_MODE, tablet);
|
|
|
|
|
|
-@@ -203,9 +212,10 @@ enum ssam_kip_cover_state {
|
|
|
- SSAM_KIP_COVER_STATE_FOLDED_BACK = 0x05,
|
|
|
+@@ -204,9 +213,10 @@ enum ssam_kip_cover_state {
|
|
|
+ SSAM_KIP_COVER_STATE_BOOK = 0x06,
|
|
|
};
|
|
|
|
|
|
-static const char *ssam_kip_cover_state_name(struct ssam_tablet_sw *sw, u32 state)
|
|
@@ -1734,8 +1734,8 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
case SSAM_KIP_COVER_STATE_DISCONNECTED:
|
|
|
return "disconnected";
|
|
|
|
|
|
-@@ -222,14 +232,15 @@ static const char *ssam_kip_cover_state_name(struct ssam_tablet_sw *sw, u32 stat
|
|
|
- return "folded-back";
|
|
|
+@@ -226,14 +236,15 @@ static const char *ssam_kip_cover_state_name(struct ssam_tablet_sw *sw, u32 stat
|
|
|
+ return "book";
|
|
|
|
|
|
default:
|
|
|
- dev_warn(&sw->sdev->dev, "unknown KIP cover state: %u\n", state);
|
|
@@ -1753,7 +1753,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
case SSAM_KIP_COVER_STATE_DISCONNECTED:
|
|
|
case SSAM_KIP_COVER_STATE_FOLDED_CANVAS:
|
|
|
case SSAM_KIP_COVER_STATE_FOLDED_BACK:
|
|
|
-@@ -240,7 +251,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s
|
|
|
+@@ -245,7 +256,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s
|
|
|
return false;
|
|
|
|
|
|
default:
|
|
@@ -1762,7 +1762,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-@@ -252,7 +263,7 @@ SSAM_DEFINE_SYNC_REQUEST_R(__ssam_kip_get_cover_state, u8, {
|
|
|
+@@ -257,7 +268,7 @@ SSAM_DEFINE_SYNC_REQUEST_R(__ssam_kip_get_cover_state, u8, {
|
|
|
.instance_id = 0x00,
|
|
|
});
|
|
|
|
|
@@ -1771,7 +1771,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
{
|
|
|
int status;
|
|
|
u8 raw;
|
|
|
-@@ -263,7 +274,8 @@ static int ssam_kip_get_cover_state(struct ssam_tablet_sw *sw, u32 *state)
|
|
|
+@@ -268,7 +279,8 @@ static int ssam_kip_get_cover_state(struct ssam_tablet_sw *sw, u32 *state)
|
|
|
return status;
|
|
|
}
|
|
|
|
|
@@ -1781,7 +1781,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-@@ -312,11 +324,15 @@ MODULE_PARM_DESC(tablet_mode_in_slate_state, "Enable tablet mode in slate device
|
|
|
+@@ -317,11 +329,15 @@ MODULE_PARM_DESC(tablet_mode_in_slate_state, "Enable tablet mode in slate device
|
|
|
#define SSAM_EVENT_POS_CID_POSTURE_CHANGED 0x03
|
|
|
#define SSAM_POS_MAX_SOURCES 4
|
|
|
|
|
@@ -1802,7 +1802,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
};
|
|
|
|
|
|
struct ssam_sources_list {
|
|
|
-@@ -324,42 +340,68 @@ struct ssam_sources_list {
|
|
|
+@@ -329,42 +345,68 @@ struct ssam_sources_list {
|
|
|
__le32 id[SSAM_POS_MAX_SOURCES];
|
|
|
} __packed;
|
|
|
|
|
@@ -1883,7 +1883,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-@@ -450,9 +492,10 @@ static int ssam_pos_get_posture_for_source(struct ssam_tablet_sw *sw, u32 source
|
|
|
+@@ -455,9 +497,10 @@ static int ssam_pos_get_posture_for_source(struct ssam_tablet_sw *sw, u32 source
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -1895,7 +1895,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
int status;
|
|
|
|
|
|
status = ssam_pos_get_source(sw, &source_id);
|
|
|
-@@ -461,13 +504,15 @@ static int ssam_pos_get_posture(struct ssam_tablet_sw *sw, u32 *state)
|
|
|
+@@ -466,13 +509,15 @@ static int ssam_pos_get_posture(struct ssam_tablet_sw *sw, u32 *state)
|
|
|
return status;
|
|
|
}
|
|
|
|
|
@@ -1915,7 +1915,7 @@ index 9fed800c7cc0..e8682f52558f 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 48cbf563a1376d7d34ffddbc3ff3775bf8560ca1 Mon Sep 17 00:00:00 2001
|
|
|
+From cbd1597f3f7425c58755575d7ba5d4bc16c24860 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 19 Feb 2023 23:33:43 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Add support for
|
|
@@ -1931,10 +1931,10 @@ Patchset: surface-sam
|
|
|
1 file changed, 57 insertions(+)
|
|
|
|
|
|
diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index e8682f52558f..8f52b62d1c19 100644
|
|
|
+index f9a58db6afde..4a029f5db20a 100644
|
|
|
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-@@ -325,9 +325,18 @@ MODULE_PARM_DESC(tablet_mode_in_slate_state, "Enable tablet mode in slate device
|
|
|
+@@ -330,9 +330,18 @@ MODULE_PARM_DESC(tablet_mode_in_slate_state, "Enable tablet mode in slate device
|
|
|
#define SSAM_POS_MAX_SOURCES 4
|
|
|
|
|
|
enum ssam_pos_source_id {
|
|
@@ -1953,7 +1953,7 @@ index e8682f52558f..8f52b62d1c19 100644
|
|
|
enum ssam_pos_state_sls {
|
|
|
SSAM_POS_SLS_LID_CLOSED = 0x00,
|
|
|
SSAM_POS_SLS_LAPTOP = 0x01,
|
|
|
-@@ -340,6 +349,30 @@ struct ssam_sources_list {
|
|
|
+@@ -345,6 +354,30 @@ struct ssam_sources_list {
|
|
|
__le32 id[SSAM_POS_MAX_SOURCES];
|
|
|
} __packed;
|
|
|
|
|
@@ -1984,7 +1984,7 @@ index e8682f52558f..8f52b62d1c19 100644
|
|
|
static const char *ssam_pos_state_name_sls(struct ssam_tablet_sw *sw, u32 state)
|
|
|
{
|
|
|
switch (state) {
|
|
|
-@@ -365,6 +398,9 @@ static const char *ssam_pos_state_name(struct ssam_tablet_sw *sw,
|
|
|
+@@ -370,6 +403,9 @@ static const char *ssam_pos_state_name(struct ssam_tablet_sw *sw,
|
|
|
const struct ssam_tablet_sw_state *state)
|
|
|
{
|
|
|
switch (state->source) {
|
|
@@ -1994,7 +1994,7 @@ index e8682f52558f..8f52b62d1c19 100644
|
|
|
case SSAM_POS_SOURCE_SLS:
|
|
|
return ssam_pos_state_name_sls(sw, state->state);
|
|
|
|
|
|
-@@ -374,6 +410,24 @@ static const char *ssam_pos_state_name(struct ssam_tablet_sw *sw,
|
|
|
+@@ -379,6 +415,24 @@ static const char *ssam_pos_state_name(struct ssam_tablet_sw *sw,
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2019,7 +2019,7 @@ index e8682f52558f..8f52b62d1c19 100644
|
|
|
static bool ssam_pos_state_is_tablet_mode_sls(struct ssam_tablet_sw *sw, u32 state)
|
|
|
{
|
|
|
switch (state) {
|
|
|
-@@ -397,6 +451,9 @@ static bool ssam_pos_state_is_tablet_mode(struct ssam_tablet_sw *sw,
|
|
|
+@@ -402,6 +456,9 @@ static bool ssam_pos_state_is_tablet_mode(struct ssam_tablet_sw *sw,
|
|
|
const struct ssam_tablet_sw_state *state)
|
|
|
{
|
|
|
switch (state->source) {
|
|
@@ -2032,7 +2032,7 @@ index e8682f52558f..8f52b62d1c19 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From d09703259bce81a2714e503dd1d2a0cb4e19627c Mon Sep 17 00:00:00 2001
|
|
|
+From 9dc13965c53cbc9effd8f82de939ccadf9912990 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 19 Feb 2023 23:41:18 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add support for
|
|
@@ -2063,121 +2063,7 @@ index 296f72d52e6a..0fe5be539652 100644
|
|
|
--
|
|
|
2.41.0
|
|
|
|
|
|
-From 81a7339efe7c7f3d30d1bf9aada7d90bc498217e Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Wed, 3 May 2023 02:02:21 +0200
|
|
|
-Subject: [PATCH] platform/surface: aggregator: Allow completion work-items to
|
|
|
- be executed in parallel
|
|
|
-
|
|
|
-Currently, event completion work-items are restricted to be run strictly
|
|
|
-in non-parallel fashion by the respective workqueue. However, this has
|
|
|
-lead to some problems:
|
|
|
-
|
|
|
-In some instances, the event notifier function called inside this
|
|
|
-completion workqueue takes a non-negligible amount of time to execute.
|
|
|
-One such example is the battery event handling code (surface_battery.c),
|
|
|
-which can result in a full battery information refresh, involving
|
|
|
-further synchronous communication with the EC inside the event handler.
|
|
|
-This is made worse if the communication fails spuriously, generally
|
|
|
-incurring a multi-second timeout.
|
|
|
-
|
|
|
-Since the event completions are run strictly non-parallel, this blocks
|
|
|
-other events from being propagated to the respective subsystems. This
|
|
|
-becomes especially noticeable for keyboard and touchpad input, which
|
|
|
-also funnel their events through this system. Here, users have reported
|
|
|
-occasional multi-second "freezes".
|
|
|
-
|
|
|
-Note, however, that the event handling system was never intended to run
|
|
|
-purely sequentially. Instead, we have one work struct per EC/SAM
|
|
|
-subsystem, processing the event queue for that subsystem. These work
|
|
|
-structs were intended to run in parallel, allowing sequential processing
|
|
|
-of work items for each subsystem but parallel processing of work items
|
|
|
-across subsystems.
|
|
|
-
|
|
|
-The only restriction to this is the way the workqueue is created.
|
|
|
-Therefore, replace create_workqueue() with alloc_workqueue() and do not
|
|
|
-restrict the maximum number of parallel work items to be executed on
|
|
|
-that queue, resolving any cross-subsystem blockage.
|
|
|
-
|
|
|
-Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
|
|
|
-Link: https://github.com/linux-surface/linux-surface/issues/1026
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- drivers/platform/surface/aggregator/controller.c | 2 +-
|
|
|
- 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
|
|
|
-index 535581c0471c..7fc602e01487 100644
|
|
|
---- a/drivers/platform/surface/aggregator/controller.c
|
|
|
-+++ b/drivers/platform/surface/aggregator/controller.c
|
|
|
-@@ -825,7 +825,7 @@ static int ssam_cplt_init(struct ssam_cplt *cplt, struct device *dev)
|
|
|
-
|
|
|
- cplt->dev = dev;
|
|
|
-
|
|
|
-- cplt->wq = create_workqueue(SSAM_CPLT_WQ_NAME);
|
|
|
-+ cplt->wq = alloc_workqueue(SSAM_CPLT_WQ_NAME, WQ_UNBOUND | WQ_MEM_RECLAIM, 0);
|
|
|
- if (!cplt->wq)
|
|
|
- return -ENOMEM;
|
|
|
-
|
|
|
---
|
|
|
-2.41.0
|
|
|
-
|
|
|
-From 94e680ee1e16ed0555b9f4e3dfe749b0b7f6780a Mon Sep 17 00:00:00 2001
|
|
|
-From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Date: Thu, 18 May 2023 22:53:12 +0200
|
|
|
-Subject: [PATCH] platform/surface: aggregator_tabletsw: Add support for book
|
|
|
- mode in KIP subsystem
|
|
|
-
|
|
|
-Devices with a type-cover have an additional "book" mode, deactivating
|
|
|
-type-cover input and turning off its backlight. This is currently
|
|
|
-unsupported, leading to the warning
|
|
|
-
|
|
|
- surface_aggregator_tablet_mode_switch 01:03:01:00:01: unknown KIP cover state: 6
|
|
|
-
|
|
|
-Therefore, add support for this state and map it to enable tablet-mode.
|
|
|
-
|
|
|
-Fixes: 9f794056db5b ("platform/surface: Add KIP/POS tablet-mode switch driver")
|
|
|
-Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
-Patchset: surface-sam
|
|
|
----
|
|
|
- drivers/platform/surface/surface_aggregator_tabletsw.c | 5 +++++
|
|
|
- 1 file changed, 5 insertions(+)
|
|
|
-
|
|
|
-diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-index 8f52b62d1c19..4a029f5db20a 100644
|
|
|
---- a/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
|
|
|
-@@ -210,6 +210,7 @@ enum ssam_kip_cover_state {
|
|
|
- SSAM_KIP_COVER_STATE_LAPTOP = 0x03,
|
|
|
- SSAM_KIP_COVER_STATE_FOLDED_CANVAS = 0x04,
|
|
|
- SSAM_KIP_COVER_STATE_FOLDED_BACK = 0x05,
|
|
|
-+ SSAM_KIP_COVER_STATE_BOOK = 0x06,
|
|
|
- };
|
|
|
-
|
|
|
- static const char *ssam_kip_cover_state_name(struct ssam_tablet_sw *sw,
|
|
|
-@@ -231,6 +232,9 @@ static const char *ssam_kip_cover_state_name(struct ssam_tablet_sw *sw,
|
|
|
- case SSAM_KIP_COVER_STATE_FOLDED_BACK:
|
|
|
- return "folded-back";
|
|
|
-
|
|
|
-+ case SSAM_KIP_COVER_STATE_BOOK:
|
|
|
-+ return "book";
|
|
|
-+
|
|
|
- default:
|
|
|
- dev_warn(&sw->sdev->dev, "unknown KIP cover state: %u\n", state->state);
|
|
|
- return "<unknown>";
|
|
|
-@@ -244,6 +248,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw,
|
|
|
- case SSAM_KIP_COVER_STATE_DISCONNECTED:
|
|
|
- case SSAM_KIP_COVER_STATE_FOLDED_CANVAS:
|
|
|
- case SSAM_KIP_COVER_STATE_FOLDED_BACK:
|
|
|
-+ case SSAM_KIP_COVER_STATE_BOOK:
|
|
|
- return true;
|
|
|
-
|
|
|
- case SSAM_KIP_COVER_STATE_CLOSED:
|
|
|
---
|
|
|
-2.41.0
|
|
|
-
|
|
|
-From 86779ad8d9fe44d26f314a3bb0d37fa0f717f1be Mon Sep 17 00:00:00 2001
|
|
|
+From 6c60ed688aa0a33e20bd9b3169444b63593a7c34 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 18 May 2023 22:57:17 +0200
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Add support for book
|