|
@@ -1,4 +1,4 @@
|
|
|
-From d85a26f2eb7a2ed68e4c56030c030bd151f90eeb Mon Sep 17 00:00:00 2001
|
|
|
+From 034c10f7c04684bba28833b3b8136368c9dc7527 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:34 +0100
|
|
|
Subject: [PATCH] platform/surface: Set up Surface Aggregator device registry
|
|
@@ -396,7 +396,7 @@ index 000000000000..a051d941ad96
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From fc0cef48bcf0326c3cecd52fc22bdec318b7d95c Mon Sep 17 00:00:00 2001
|
|
|
+From a09281921a27087db2d48580b5c09e56f62db2cd Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:35 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add base device hub
|
|
@@ -725,7 +725,7 @@ index a051d941ad96..6c23d75a044c 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 9d99facf87190ec57305a908829037887d2a324d Mon Sep 17 00:00:00 2001
|
|
|
+From 482f1bc858fde2c6a1fd330548500f08589240c6 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:36 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add battery subsystem
|
|
@@ -814,7 +814,7 @@ index 6c23d75a044c..cde279692842 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 225f6f6b8848bb6c4752510251791ce7cd7e8ed6 Mon Sep 17 00:00:00 2001
|
|
|
+From cdb9998251939f427f47b85846a5b1914f12b95c Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:37 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add platform profile
|
|
@@ -916,7 +916,7 @@ index cde279692842..33904613dd4b 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 982bd482ea8323218ee40a4ff42b8d7f50f30859 Mon Sep 17 00:00:00 2001
|
|
|
+From d30d9a3f6fe43f497aed8eae6a559a5f191bbab6 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:38 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add DTX device
|
|
@@ -960,7 +960,7 @@ index 33904613dd4b..dc044d06828b 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 78b63edb2081fd123019b0f61a6d09db47ad4643 Mon Sep 17 00:00:00 2001
|
|
|
+From f48e806ac0cb67eb06d61fc5adf4c7e5b7a89edd Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 12 Feb 2021 12:54:39 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add HID subsystem
|
|
@@ -1056,7 +1056,7 @@ index dc044d06828b..caee90d135c5 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 5b1f25eec0165e7a745cc87e4a45e3dbafb36016 Mon Sep 17 00:00:00 2001
|
|
|
+From da7ab6cbc069aa979b548d4aafb571e0e4125318 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 11 Feb 2021 21:17:03 +0100
|
|
|
Subject: [PATCH] platform/surface: Add platform profile driver
|
|
@@ -1342,7 +1342,7 @@ index 000000000000..0081b01a5b0f
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 3587540017845f99f6d311bb59c6c26824bf9237 Mon Sep 17 00:00:00 2001
|
|
|
+From 33f423309db2f55769a45acfd59063a8aebed1fc 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
|
|
@@ -1721,7 +1721,7 @@ index 02f3e06c0a60..4441ad667c3f 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 3e6957d1939ac4fd7a32df8a3805dcd32243875d Mon Sep 17 00:00:00 2001
|
|
|
+From 7a07b11680d1d98ca77a55f37c5a38711b487ca5 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 8 Mar 2021 19:48:17 +0100
|
|
|
Subject: [PATCH] platform/surface: Add DTX driver
|
|
@@ -3216,7 +3216,7 @@ index 000000000000..0833aab0d819
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 5f90d1d6214b7f4a0372dadbfe614ec12ae13425 Mon Sep 17 00:00:00 2001
|
|
|
+From 3ac523ccd43bdde0b52426d255fbc50e00659605 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 8 Mar 2021 19:48:18 +0100
|
|
|
Subject: [PATCH] platform/surface: dtx: Add support for native SSAM devices
|
|
@@ -3360,7 +3360,7 @@ index 1301fab0ea14..85451eb94d98 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 942c6392c91293171d960506a8d0a65896bc4805 Mon Sep 17 00:00:00 2001
|
|
|
+From d84ff64a1fa8dce47f3d60fa9ec98db43dcaaee0 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 8 Mar 2021 19:48:19 +0100
|
|
|
Subject: [PATCH] docs: driver-api: Add Surface DTX driver documentation
|
|
@@ -4131,7 +4131,7 @@ index 3917e7363520..da1487d672a8 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From d3739c04cbefe7605af24308c13d0a690203af6a Mon Sep 17 00:00:00 2001
|
|
|
+From 1518f129b5389792afb8a311a11294668a5bf6e7 Mon Sep 17 00:00:00 2001
|
|
|
From: Wei Yongjun <weiyongjun1@huawei.com>
|
|
|
Date: Tue, 9 Mar 2021 13:15:00 +0000
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Make symbol
|
|
@@ -4172,7 +4172,7 @@ index cdb4a95af3e8..86cff5fce3cd 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 3b80ee5034052a82df2fb0b1370a2f8511f3bc1f Mon Sep 17 00:00:00 2001
|
|
|
+From cec31a9cad519c94fc89a33d9170629a2d310e52 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 9 Mar 2021 17:25:50 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add support for
|
|
@@ -4215,7 +4215,7 @@ index 86cff5fce3cd..eccb9d1007cd 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From e7d4cc3e3f1abba7d83303c452e9c718ab0e2e4c Mon Sep 17 00:00:00 2001
|
|
|
+From 891b8f70fb304ab1ff3482d5aa929ea156996ff4 Mon Sep 17 00:00:00 2001
|
|
|
From: kernel test robot <lkp@intel.com>
|
|
|
Date: Fri, 19 Mar 2021 13:19:19 +0800
|
|
|
Subject: [PATCH] platform/surface: fix semicolon.cocci warnings
|
|
@@ -4254,7 +4254,7 @@ index 85451eb94d98..1fedacf74050 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 2eeddec425f7ea847bd1dc9ff9baf1a112814cfe Mon Sep 17 00:00:00 2001
|
|
|
+From 0cd4b642ccb520ba5b9cac246da1ca2bb76216d7 Mon Sep 17 00:00:00 2001
|
|
|
From: Dan Carpenter <dan.carpenter@oracle.com>
|
|
|
Date: Fri, 26 Mar 2021 15:28:48 +0300
|
|
|
Subject: [PATCH] platform/surface: clean up a variable in surface_dtx_read()
|
|
@@ -4287,7 +4287,7 @@ index 1fedacf74050..63ce587e79e3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From b37d3dc077939e99cf0950a6a3009764531bcc15 Mon Sep 17 00:00:00 2001
|
|
|
+From 81d6d2613cf852a1129960879d0ce6b7dae67755 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 6 Apr 2021 01:12:22 +0200
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Give devices time to
|
|
@@ -4530,7 +4530,7 @@ index eccb9d1007cd..685d37a7add1 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 5c89063cd80d956a0060bba8f01cdb32e4b8647a Mon Sep 17 00:00:00 2001
|
|
|
+From 5177fd376432e132488109743f095ec3c47eafae Mon Sep 17 00:00:00 2001
|
|
|
From: Barry Song <song.bao.hua@hisilicon.com>
|
|
|
Date: Wed, 3 Mar 2021 11:49:15 +1300
|
|
|
Subject: [PATCH] genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()
|
|
@@ -4632,7 +4632,7 @@ index 21ea370fccda..49288e941365 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 4c27478492346cbc69ad1779f0ac0f2dd93c4ec2 Mon Sep 17 00:00:00 2001
|
|
|
+From fdca7a09d5270022355cdde51b2f95317af1e6fa Mon Sep 17 00:00:00 2001
|
|
|
From: Tian Tao <tiantao6@hisilicon.com>
|
|
|
Date: Wed, 7 Apr 2021 15:00:52 +0800
|
|
|
Subject: [PATCH] platform/surface: aggregator: move to use request_irq by
|
|
@@ -4679,7 +4679,7 @@ index aa6f37b4f46e..00e38284885a 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 8dcb1d5d4c05dbea8d40e4e9f23e631f1e5cdd3c Mon Sep 17 00:00:00 2001
|
|
|
+From 7a2a06bd6598d33335519271102ab2f5722e0913 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Wed, 5 May 2021 14:53:45 +0200
|
|
|
Subject: [PATCH] platform/surface: aggregator: Do not mark interrupt as shared
|
|
@@ -4713,7 +4713,7 @@ index 00e38284885a..1f42fcd5d8c3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From afcab874b65e164fd01bee6905b281642e4785c5 Mon Sep 17 00:00:00 2001
|
|
|
+From 71a7d75c951e4001b35779cf39f138487454362d Mon Sep 17 00:00:00 2001
|
|
|
From: Dan Carpenter <dan.carpenter@oracle.com>
|
|
|
Date: Tue, 20 Apr 2021 11:44:02 +0300
|
|
|
Subject: [PATCH] platform/surface: aggregator: fix a bit test
|
|
@@ -4748,7 +4748,7 @@ index 1f42fcd5d8c3..8a70df60142c 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 8636b17320f580819226a2108b9cb211d36f0fcb Mon Sep 17 00:00:00 2001
|
|
|
+From 4bac02ecade55ad1c2dc1ebbca0510d8e05c8823 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Wed, 10 Mar 2021 23:53:28 +0100
|
|
|
Subject: [PATCH] HID: Add support for Surface Aggregator Module HID transport
|
|
@@ -5495,7 +5495,7 @@ index 000000000000..4b1a7b57e035
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 0b9f3fca97a121daae91fd91364f41c844f229e8 Mon Sep 17 00:00:00 2001
|
|
|
+From 61201d7c3512e3b7a74cb76f06db959e50a60d0f Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Wed, 10 Mar 2021 23:53:29 +0100
|
|
|
Subject: [PATCH] HID: surface-hid: Add support for legacy keyboard interface
|
|
@@ -5866,7 +5866,7 @@ index 000000000000..0635341bc517
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From b533b1fbc3f818c8bd2bb2967093deb3ce665ea5 Mon Sep 17 00:00:00 2001
|
|
|
+From 5b5d66c4569050cf2d15073cef9ec0fee33dfa3c Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 23 Apr 2021 00:51:22 +0200
|
|
|
Subject: [PATCH] HID: surface-hid: Fix integer endian conversion
|
|
@@ -5905,7 +5905,7 @@ index 7b27ec392232..5571e74abe91 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From da3b800dc4b1ca234c239cf30a0d5bfbf3540e53 Mon Sep 17 00:00:00 2001
|
|
|
+From 3e16741959dfab7d9bbcab0c1c7f28f5cd5b598e Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 6 Apr 2021 01:41:25 +0200
|
|
|
Subject: [PATCH] power: supply: Add battery driver for Surface Aggregator
|
|
@@ -6887,7 +6887,7 @@ index 000000000000..4116dd839ecd
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 51bdf381a1d059ecefb2e13f663752c4016e6156 Mon Sep 17 00:00:00 2001
|
|
|
+From 4e25091e5ce472d91a7786010a1a00f4ed1a0374 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 6 Apr 2021 01:41:26 +0200
|
|
|
Subject: [PATCH] power: supply: Add AC driver for Surface Aggregator Module
|
|
@@ -7255,7 +7255,7 @@ index 000000000000..c2dd7e604d14
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From c10193b61e2b7cd895ad7447c61dad50609f9173 Mon Sep 17 00:00:00 2001
|
|
|
+From 7feb809859bd62d4a0b10e7d0ce3bdfee5e51d16 Mon Sep 17 00:00:00 2001
|
|
|
From: Qiheng Lin <linqiheng@huawei.com>
|
|
|
Date: Sat, 10 Apr 2021 12:12:46 +0800
|
|
|
Subject: [PATCH] power: supply: surface-battery: Make some symbols static
|
|
@@ -7304,7 +7304,7 @@ index 4116dd839ecd..7efa431a62b2 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 37fd14bed9096ff15a7ea94e0dfd295f13a08ef0 Mon Sep 17 00:00:00 2001
|
|
|
+From 1602265bbdfcc8368d48c3aa664e5b52fcea88da Mon Sep 17 00:00:00 2001
|
|
|
From: Qiheng Lin <linqiheng@huawei.com>
|
|
|
Date: Sat, 10 Apr 2021 12:12:49 +0800
|
|
|
Subject: [PATCH] power: supply: surface-charger: Make symbol
|
|
@@ -7343,7 +7343,7 @@ index c2dd7e604d14..81a5b79822c9 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From ee96c5d16365a59aa098ed7a328c6e3f9366514c Mon Sep 17 00:00:00 2001
|
|
|
+From 729ee99a1b2b0586c5699f96c0ad55926322c4a6 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 4 May 2021 20:00:46 +0200
|
|
|
Subject: [PATCH] power: supply: surface_battery: Fix battery event handling
|
|
@@ -7400,3 +7400,238 @@ index 7efa431a62b2..5ec2e6bb2465 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
+From 36347fcfa36a6d6bfa89d75545c73d44704cf4db Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Tue, 11 May 2021 11:24:21 +0200
|
|
|
+Subject: [PATCH] power: supply: surface-charger: Fix type of integer variable
|
|
|
+
|
|
|
+The ac->state field is __le32, not u32. So change the variable we're
|
|
|
+temporarily storing it in to __le32 as well.
|
|
|
+
|
|
|
+Reported-by: kernel test robot <lkp@intel.com>
|
|
|
+Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module")
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ drivers/power/supply/surface_charger.c | 2 +-
|
|
|
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
+
|
|
|
+diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
|
|
|
+index 81a5b79822c9..a060c36c7766 100644
|
|
|
+--- a/drivers/power/supply/surface_charger.c
|
|
|
++++ b/drivers/power/supply/surface_charger.c
|
|
|
+@@ -66,7 +66,7 @@ struct spwr_ac_device {
|
|
|
+
|
|
|
+ static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)
|
|
|
+ {
|
|
|
+- u32 old = ac->state;
|
|
|
++ __le32 old = ac->state;
|
|
|
+ int status;
|
|
|
+
|
|
|
+ lockdep_assert_held(&ac->lock);
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|
|
|
+From 8a75f61f824d460381dde994c806f233ddccfd58 Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Wed, 5 May 2021 18:17:04 +0200
|
|
|
+Subject: [PATCH] serial: 8250_dw: Add device HID for new AMD UART controller
|
|
|
+
|
|
|
+Add device HID AMDI0022 to the AMD UART controller driver match table
|
|
|
+and create a platform device for it. This controller can be found on
|
|
|
+Microsoft Surface Laptop 4 devices and seems similar enough that we can
|
|
|
+just copy the existing AMDI0020 entries.
|
|
|
+
|
|
|
+Cc: <stable@vger.kernel.org> # 5.10+
|
|
|
+Tested-by: Sachi King <nakato@nakato.io>
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ drivers/acpi/acpi_apd.c | 1 +
|
|
|
+ drivers/tty/serial/8250/8250_dw.c | 1 +
|
|
|
+ 2 files changed, 2 insertions(+)
|
|
|
+
|
|
|
+diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
|
|
|
+index 39359ce0eb2c..645e82a66bb0 100644
|
|
|
+--- a/drivers/acpi/acpi_apd.c
|
|
|
++++ b/drivers/acpi/acpi_apd.c
|
|
|
+@@ -226,6 +226,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
|
|
|
+ { "AMDI0010", APD_ADDR(wt_i2c_desc) },
|
|
|
+ { "AMD0020", APD_ADDR(cz_uart_desc) },
|
|
|
+ { "AMDI0020", APD_ADDR(cz_uart_desc) },
|
|
|
++ { "AMDI0022", APD_ADDR(cz_uart_desc) },
|
|
|
+ { "AMD0030", },
|
|
|
+ { "AMD0040", APD_ADDR(fch_misc_desc)},
|
|
|
+ { "HYGO0010", APD_ADDR(wt_i2c_desc) },
|
|
|
+diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
|
|
|
+index 9e204f9b799a..a3a0154da567 100644
|
|
|
+--- a/drivers/tty/serial/8250/8250_dw.c
|
|
|
++++ b/drivers/tty/serial/8250/8250_dw.c
|
|
|
+@@ -714,6 +714,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = {
|
|
|
+ { "APMC0D08", 0},
|
|
|
+ { "AMD0020", 0 },
|
|
|
+ { "AMDI0020", 0 },
|
|
|
++ { "AMDI0022", 0 },
|
|
|
+ { "BRCM2032", 0 },
|
|
|
+ { "HISI0031", 0 },
|
|
|
+ { },
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|
|
|
+From eebad61f66d0119629269d1d3eb2339f9e371192 Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Wed, 5 May 2021 18:22:04 +0200
|
|
|
+Subject: [PATCH] pinctrl/amd: Add device HID for new AMD GPIO controller
|
|
|
+
|
|
|
+Add device HID AMDI0031 to the AMD GPIO controller driver match table.
|
|
|
+This controller can be found on Microsoft Surface Laptop 4 devices and
|
|
|
+seems similar enough that we can just copy the existing AMDI0030 entry.
|
|
|
+
|
|
|
+Cc: <stable@vger.kernel.org> # 5.10+
|
|
|
+Tested-by: Sachi King <nakato@nakato.io>
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ drivers/pinctrl/pinctrl-amd.c | 1 +
|
|
|
+ 1 file changed, 1 insertion(+)
|
|
|
+
|
|
|
+diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
|
|
|
+index 2d4acf21117c..c5950a3b4e4c 100644
|
|
|
+--- a/drivers/pinctrl/pinctrl-amd.c
|
|
|
++++ b/drivers/pinctrl/pinctrl-amd.c
|
|
|
+@@ -991,6 +991,7 @@ static int amd_gpio_remove(struct platform_device *pdev)
|
|
|
+ static const struct acpi_device_id amd_gpio_acpi_match[] = {
|
|
|
+ { "AMD0030", 0 },
|
|
|
+ { "AMDI0030", 0},
|
|
|
++ { "AMDI0031", 0},
|
|
|
+ { },
|
|
|
+ };
|
|
|
+ MODULE_DEVICE_TABLE(acpi, amd_gpio_acpi_match);
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|
|
|
+From 1bfc4a7ec82c4c2e25f568cf1b14b071bd5737c3 Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Mon, 10 May 2021 23:33:17 +0200
|
|
|
+Subject: [PATCH] x86/i8259: Work around buggy legacy PIC
|
|
|
+
|
|
|
+The legacy PIC on the AMD variant of the Microsoft Surface Laptop 4 has
|
|
|
+some problems on boot. For some reason it consistently does not respond
|
|
|
+on the first try, requiring a couple more tries before it finally
|
|
|
+responds.
|
|
|
+
|
|
|
+This currently leads to the PIC not being properly recognized, which
|
|
|
+prevents interrupt handling down the line. Ultimately, this also leads
|
|
|
+to the pinctrl-amd driver failing to probe due to platform_get_irq()
|
|
|
+returning -EINVAL for its base IRQ. That, in turn, means that several
|
|
|
+interrupts are not available and device drivers relying on those will
|
|
|
+defer probing indefinitely, as querying those interrupts returns
|
|
|
+-EPROBE_DEFER.
|
|
|
+
|
|
|
+Add a quirk table and a retry-loop to work around that.
|
|
|
+
|
|
|
+Also switch to pr_info() due to complaints by checkpatch and add a
|
|
|
+pr_fmt() definition for completeness.
|
|
|
+
|
|
|
+Cc: <stable@vger.kernel.org> # 5.10+
|
|
|
+Co-developed-by: Sachi King <nakato@nakato.io>
|
|
|
+Signed-off-by: Sachi King <nakato@nakato.io>
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ arch/x86/kernel/i8259.c | 51 +++++++++++++++++++++++++++++++++++++----
|
|
|
+ 1 file changed, 46 insertions(+), 5 deletions(-)
|
|
|
+
|
|
|
+diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
|
|
|
+index 282b4ee1339f..0da757c6b292 100644
|
|
|
+--- a/arch/x86/kernel/i8259.c
|
|
|
++++ b/arch/x86/kernel/i8259.c
|
|
|
+@@ -1,4 +1,7 @@
|
|
|
+ // SPDX-License-Identifier: GPL-2.0
|
|
|
++
|
|
|
++#define pr_fmt(fmt) "i8259: " fmt
|
|
|
++
|
|
|
+ #include <linux/linkage.h>
|
|
|
+ #include <linux/errno.h>
|
|
|
+ #include <linux/signal.h>
|
|
|
+@@ -16,6 +19,7 @@
|
|
|
+ #include <linux/io.h>
|
|
|
+ #include <linux/delay.h>
|
|
|
+ #include <linux/pgtable.h>
|
|
|
++#include <linux/dmi.h>
|
|
|
+
|
|
|
+ #include <linux/atomic.h>
|
|
|
+ #include <asm/timer.h>
|
|
|
+@@ -298,11 +302,39 @@ static void unmask_8259A(void)
|
|
|
+ raw_spin_unlock_irqrestore(&i8259A_lock, flags);
|
|
|
+ }
|
|
|
+
|
|
|
++/*
|
|
|
++ * DMI table to identify devices with quirky probe behavior. See comment in
|
|
|
++ * probe_8259A() for more details.
|
|
|
++ */
|
|
|
++static const struct dmi_system_id retry_probe_quirk_table[] = {
|
|
|
++ {
|
|
|
++ .ident = "Microsoft Surface Laptop 4 (AMD)",
|
|
|
++ .matches = {
|
|
|
++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
|
|
|
++ DMI_MATCH(DMI_PRODUCT_SKU, "Surface_Laptop_4_1952:1953")
|
|
|
++ },
|
|
|
++ },
|
|
|
++ {}
|
|
|
++};
|
|
|
++
|
|
|
+ static int probe_8259A(void)
|
|
|
+ {
|
|
|
+ unsigned long flags;
|
|
|
+ unsigned char probe_val = ~(1 << PIC_CASCADE_IR);
|
|
|
+ unsigned char new_val;
|
|
|
++ unsigned int i, imax = 1;
|
|
|
++
|
|
|
++ /*
|
|
|
++ * Some systems have a legacy PIC that doesn't immediately respond
|
|
|
++ * after boot. We know it's there, we know it should respond and is
|
|
|
++ * required for proper interrupt handling later on, so let's try a
|
|
|
++ * couple of times.
|
|
|
++ */
|
|
|
++ if (dmi_check_system(retry_probe_quirk_table)) {
|
|
|
++ pr_warn("system with broken legacy PIC detected, re-trying multiple times if necessary\n");
|
|
|
++ imax = 10;
|
|
|
++ }
|
|
|
++
|
|
|
+ /*
|
|
|
+ * Check to see if we have a PIC.
|
|
|
+ * Mask all except the cascade and read
|
|
|
+@@ -312,15 +344,24 @@ static int probe_8259A(void)
|
|
|
+ */
|
|
|
+ raw_spin_lock_irqsave(&i8259A_lock, flags);
|
|
|
+
|
|
|
+- outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */
|
|
|
+- outb(probe_val, PIC_MASTER_IMR);
|
|
|
+- new_val = inb(PIC_MASTER_IMR);
|
|
|
+- if (new_val != probe_val) {
|
|
|
+- printk(KERN_INFO "Using NULL legacy PIC\n");
|
|
|
++ for (i = 0; i < imax; i++) {
|
|
|
++ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */
|
|
|
++ outb(probe_val, PIC_MASTER_IMR);
|
|
|
++ new_val = inb(PIC_MASTER_IMR);
|
|
|
++ if (new_val == probe_val)
|
|
|
++ break;
|
|
|
++ }
|
|
|
++
|
|
|
++ if (i == imax) {
|
|
|
++ pr_info("using NULL legacy PIC\n");
|
|
|
+ legacy_pic = &null_legacy_pic;
|
|
|
+ }
|
|
|
+
|
|
|
+ raw_spin_unlock_irqrestore(&i8259A_lock, flags);
|
|
|
++
|
|
|
++ if (imax > 1 && i < imax)
|
|
|
++ pr_info("got legacy PIC after %d tries\n", i + 1);
|
|
|
++
|
|
|
+ return nr_legacy_irqs();
|
|
|
+ }
|
|
|
+
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|