aboutsummaryrefslogtreecommitdiff
path: root/SOURCES/linux-surface.patch
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-04-02 13:17:09 +0200
committerJan200101 <sentrycraft123@gmail.com>2023-04-02 13:17:09 +0200
commit4b0c9e6653550c9ca30435bdccae35736505d038 (patch)
treeb9a2219696360ec25dff23dcf0b11fa6a3aff4d4 /SOURCES/linux-surface.patch
parent2d9a7d6077c57594fa30fa91c608696de1539f0f (diff)
downloadkernel-fsync-4b0c9e6653550c9ca30435bdccae35736505d038.tar.gz
kernel-fsync-4b0c9e6653550c9ca30435bdccae35736505d038.zip
kernel 6.2.9
Diffstat (limited to 'SOURCES/linux-surface.patch')
-rw-r--r--SOURCES/linux-surface.patch2157
1 files changed, 2044 insertions, 113 deletions
diff --git a/SOURCES/linux-surface.patch b/SOURCES/linux-surface.patch
index a65418f..93c3095 100644
--- a/SOURCES/linux-surface.patch
+++ b/SOURCES/linux-surface.patch
@@ -1,4 +1,4 @@
-From f0f9908162794d3644e62a58b37b56d567534294 Mon Sep 17 00:00:00 2001
+From 4143ddc1e0a4eece17f89415103d53ac7a144bcf Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 18 Oct 2020 16:42:44 +0900
Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
@@ -99,7 +99,7 @@ index 6beb00858c33f..d82d77387a0a6 100644
--
2.39.2
-From e9f7cfd7281e4e3671763a16213bdcb61ed6f110 Mon Sep 17 00:00:00 2001
+From 602c7a892181d8c5df79e00bdbb70f5d60129a1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 3 Nov 2020 13:28:04 +0100
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
@@ -266,7 +266,7 @@ index d6ff964aec5bf..5d30ae39d65ec 100644
--
2.39.2
-From 7c451262506bb1a5c6a8cbfa399fc3fc3434ceae Mon Sep 17 00:00:00 2001
+From f53f8cc6075732f0f7fe9f8654a0315df9295efb Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:11:49 +0900
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
@@ -421,7 +421,7 @@ index 5d30ae39d65ec..c14eb56eb9118 100644
--
2.39.2
-From 0f8b07fb4127fbaecd49f3bbfbfcfdb18247d065 Mon Sep 17 00:00:00 2001
+From f891abd4ae978d47ddc73544439c3fdc21892697 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Thu, 25 Mar 2021 11:33:02 +0100
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
@@ -499,7 +499,7 @@ index 18bc947187115..1d5ff282d347d 100644
--
2.39.2
-From a7f64ee2f71e3ef582fb670149ba08e6801286eb Mon Sep 17 00:00:00 2001
+From 2a55ea07586e522cebf3fc25f702b2e758035622 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Feb 2021 00:45:52 +0100
Subject: [PATCH] ath10k: Add module parameters to override board files
@@ -620,7 +620,7 @@ index 5eb131ab916fd..67f074a126d1f 100644
--
2.39.2
-From ad8c49adfd87da69e34f126dbc741a88bebb8480 Mon Sep 17 00:00:00 2001
+From b3bc32f2dd9526cdbfe33ee96bf1cb216575df53 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Thu, 30 Jul 2020 13:21:53 +0200
Subject: [PATCH] misc: mei: Add missing IPTS device IDs
@@ -658,7 +658,7 @@ index 5bf0d50d55a00..c13864512229f 100644
--
2.39.2
-From d734f2c9c41951aef9121a0d3b61dba8e38e5393 Mon Sep 17 00:00:00 2001
+From 0251d76352babdd04c8879356d74ad870903d1a0 Mon Sep 17 00:00:00 2001
From: Liban Hannan <liban.p@gmail.com>
Date: Tue, 12 Apr 2022 23:31:12 +0100
Subject: [PATCH] iommu: ipts: use IOMMU passthrough mode for IPTS
@@ -758,7 +758,7 @@ index 52afcdaf7c7f1..08e35f9e67a62 100644
--
2.39.2
-From 836fbb631faba7ee748d48fe02cb82fa2a342642 Mon Sep 17 00:00:00 2001
+From 4be07c569cbf78a6b7f8ab628c076b8cce454da7 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Sun, 11 Dec 2022 12:00:59 +0100
Subject: [PATCH] hid: Add support for Intel Precise Touch and Stylus
@@ -3608,7 +3608,7 @@ index 0000000000000..a314843599fc3
--
2.39.2
-From 5d9e31beb9803ab696ffa4fccfe5f5456b6fd231 Mon Sep 17 00:00:00 2001
+From 0e662b09ba1ab4c9c9437b2fc829d988faad6c54 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Sun, 11 Dec 2022 12:03:38 +0100
Subject: [PATCH] iommu: intel: Disable source id verification for ITHC
@@ -3649,7 +3649,7 @@ index f58f5f57af782..59a6a458d9bfa 100644
--
2.39.2
-From dac0d10bd6d4b61fa008ada6785db7fe674eab2f Mon Sep 17 00:00:00 2001
+From 552d746111170ba0336a12c0d99fb42e597e1eda Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Sun, 11 Dec 2022 12:10:54 +0100
Subject: [PATCH] hid: Add support for Intel Touch Host Controller
@@ -5041,7 +5041,7 @@ index 0000000000000..6a9b0d480bc15
--
2.39.2
-From cf654bbf9cc15589345a35e792d0c185c3d32d27 Mon Sep 17 00:00:00 2001
+From 03db40d5d6ce871a22d78669715b53b381a77c17 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
@@ -5332,7 +5332,7 @@ index 45501b6e54e8a..5c4ae1a261831 100644
--
2.39.2
-From 3520566242884ea0d1f7faf0065ca30d13816c53 Mon Sep 17 00:00:00 2001
+From aea628fa5adf8415392c89f0db7ce5adee5a1fc3 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
@@ -5529,7 +5529,7 @@ index 2a2c17771d014..55cc61bba1da6 100644
--
2.39.2
-From 402849887b8f16db02e3a31f9100cf1d021458d0 Mon Sep 17 00:00:00 2001
+From 121881839e7faccb16feb2436560ad4fe6a5caf8 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
@@ -5572,7 +5572,7 @@ index 43061514be382..62f27cdb6ca8f 100644
--
2.39.2
-From 0b2a3dafa8d753d63fe782699b8328ffb1607109 Mon Sep 17 00:00:00 2001
+From 5d94ac58374dbda2edfd17e332907b49066370fb 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
@@ -5624,7 +5624,7 @@ index 27d95a6a78513..bd8cd453c393a 100644
--
2.39.2
-From 07db1ac6c06904c9b665eb39f7e6e79adae1f72c Mon Sep 17 00:00:00 2001
+From b9e8660102b7ee5ca61828ca630e983150982587 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
@@ -5722,7 +5722,7 @@ index ed36944467f9f..0de76a784a35f 100644
--
2.39.2
-From e11b80951fb6e7f5293b1fa2a2837467a55c0a29 Mon Sep 17 00:00:00 2001
+From 0be6ac08babd0afd52fc2e617680cf30b45435bf 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
@@ -5756,7 +5756,7 @@ index 0635341bc5174..42933bf3e925f 100644
--
2.39.2
-From aaeea5a4745e5b54762b93225bc7f89d371a60c4 Mon Sep 17 00:00:00 2001
+From 3d6797aafcb95a4f7024f2dc266bb9a78991112a 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
@@ -5992,7 +5992,7 @@ index 46c45d1b63682..4da20b7a0ee5e 100644
--
2.39.2
-From e31f80aab1c9b2805d397628d055a459eb997ce7 Mon Sep 17 00:00:00 2001
+From 1a41d96a435d449d6596f9803457d3e2cf5abba8 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
@@ -6047,7 +6047,7 @@ index 023f126121d7d..296f72d52e6a6 100644
--
2.39.2
-From e946d79040fc1e548f29d0eebdc1e7259778de60 Mon Sep 17 00:00:00 2001
+From 8e77c84e8de0fb2712dcc583668cd0627fe1a023 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
@@ -6594,7 +6594,7 @@ index 4da20b7a0ee5e..1545e5567b152 100644
--
2.39.2
-From b81b226c288dfe1fd11e7d78c60866185916fb69 Mon Sep 17 00:00:00 2001
+From af7547b9a21a5048e20c1a275cf4fcd0b0cd9328 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()
@@ -6650,7 +6650,7 @@ index f004a24952013..7b6d887dccdbf 100644
--
2.39.2
-From cc0cd17158c7de114be037f43bb1c19a96cbac0c Mon Sep 17 00:00:00 2001
+From a15c035f0a681e25b94ab0468caf028801fbcbeb 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
@@ -6958,7 +6958,7 @@ index 9fed800c7cc09..e8682f52558f3 100644
--
2.39.2
-From 7445256e32762f11b764db12899e687c02b9f13c Mon Sep 17 00:00:00 2001
+From ee5e2e877d3916755db979c8ec74e1bfb96e75ed 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
@@ -7075,7 +7075,7 @@ index e8682f52558f3..8f52b62d1c195 100644
--
2.39.2
-From 3889e8ce87c3108b055b123008aafc3b410db6dc Mon Sep 17 00:00:00 2001
+From 79d04c923646a40b89b3c2e3bd21641e10dd8fbc 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
@@ -7106,7 +7106,7 @@ index 296f72d52e6a6..0fe5be5396525 100644
--
2.39.2
-From 798df4319e8e6ac07aeddc870d1ad48edcd40544 Mon Sep 17 00:00:00 2001
+From 25ec6174923853d6c3564b5a196d8717a344aef8 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 25 Jul 2020 17:19:53 +0200
Subject: [PATCH] i2c: acpi: Implement RawBytes read access
@@ -7218,7 +7218,7 @@ index 4dd777cc0c89f..b2338618163ad 100644
--
2.39.2
-From 4dcd14ffaa3a79e3733fe683276043c2d7b198d8 Mon Sep 17 00:00:00 2001
+From d3a15c30f119dd1a5278ba50b902815ca5f6fdc8 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 13 Feb 2021 16:41:18 +0100
Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch
@@ -7441,7 +7441,7 @@ index 0000000000000..8b816ed8f35c6
--
2.39.2
-From 7a1c92a305c0f7661547d30ff24a7d869030a753 Mon Sep 17 00:00:00 2001
+From d2e49c271c1c1a8716a2bf50bf3f45eb9267e302 Mon Sep 17 00:00:00 2001
From: Sachi King <nakato@nakato.io>
Date: Tue, 5 Oct 2021 00:05:09 +1100
Subject: [PATCH] Input: soc_button_array - support AMD variant Surface devices
@@ -7518,7 +7518,7 @@ index 09489380afda7..0f02411a60f1c 100644
--
2.39.2
-From d1588776404e7e90332fa0873295d7207c39066b Mon Sep 17 00:00:00 2001
+From 67540c2fec9e86b264b4b0eff2d66e071696fdd0 Mon Sep 17 00:00:00 2001
From: Sachi King <nakato@nakato.io>
Date: Tue, 5 Oct 2021 00:22:57 +1100
Subject: [PATCH] platform/surface: surfacepro3_button: don't load on amd
@@ -7590,7 +7590,7 @@ index 2755601f979cd..4240c98ca2265 100644
--
2.39.2
-From b567518d6e3e3caad45d5b8d5963ead145aa4928 Mon Sep 17 00:00:00 2001
+From a0e4aa5d2df3483d1face559757b642f8984e5d7 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 18 Feb 2023 01:02:49 +0100
Subject: [PATCH] USB: quirks: Add USB_QUIRK_DELAY_INIT for Surface Go 3
@@ -7631,7 +7631,7 @@ index 934b3d997702e..2c6604c6e8e12 100644
--
2.39.2
-From 760651322cb84adc3c7c43cc25f8061338034914 Mon Sep 17 00:00:00 2001
+From 53538b95cf165320934decf246dee39bb9473553 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Thu, 5 Nov 2020 13:09:45 +0100
Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when
@@ -7864,7 +7864,7 @@ index e31be0cb8b850..63fd042aba6ba 100644
--
2.39.2
-From 82750bfc7a88005cbe318258cb03d85378e4e6e4 Mon Sep 17 00:00:00 2001
+From 670ed14c523191a642ef62b5b89919674ab17926 Mon Sep 17 00:00:00 2001
From: PJungkamp <p.jungkamp@gmail.com>
Date: Fri, 25 Feb 2022 12:04:25 +0100
Subject: [PATCH] hid/multitouch: Add support for surface pro type cover tablet
@@ -8164,7 +8164,7 @@ index 63fd042aba6ba..508a250ff4bf1 100644
--
2.39.2
-From d9628caa65eb9f1a284cbad280e4c1810df78f0f Mon Sep 17 00:00:00 2001
+From ef9a8f34a8ffe0116f8b369418d397f167b48fa6 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 19 Feb 2023 22:12:24 +0100
Subject: [PATCH] PCI: Add quirk to prevent calling shutdown mehtod
@@ -8247,7 +8247,7 @@ index 494fa46f57671..106fb2ff855b2 100644
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x466d, quirk_no_shutdown); // Thunderbolt 4 NHI
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x46a8, quirk_no_shutdown); // GPU
diff --git a/include/linux/pci.h b/include/linux/pci.h
-index 50042ea8e0083..b8d8af87ac2e4 100644
+index db6ec828aa4b2..9f47d975834b2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -464,6 +464,7 @@ struct pci_dev {
@@ -8261,7 +8261,7 @@ index 50042ea8e0083..b8d8af87ac2e4 100644
--
2.39.2
-From b533d43dfc72262385fd4c011029baee96094c82 Mon Sep 17 00:00:00 2001
+From 160d5791ca908aa9a4b47d3ca37e5ada9d29fc74 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 12 Mar 2023 01:41:57 +0100
Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 9
@@ -8312,7 +8312,7 @@ index c219b840d491a..69c4352e8406b 100644
--
2.39.2
-From 8d472c470305b3400b3fb5df2db12aceea7e6155 Mon Sep 17 00:00:00 2001
+From 79ea44e430eb19ad84ab22979bc2a9bc932f055d Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sun, 10 Oct 2021 20:56:57 +0200
Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an
@@ -8388,7 +8388,7 @@ index 0c6f06abe3f47..4fc320f424e8e 100644
--
2.39.2
-From 5d69d065250c8840b3dfb7f1584d34bbc0056849 Mon Sep 17 00:00:00 2001
+From 1ed4807a016ee75bfd6f2e6b61f971aa4cdbd466 Mon Sep 17 00:00:00 2001
From: zouxiaoh <xiaohong.zou@intel.com>
Date: Fri, 25 Jun 2021 08:52:59 +0800
Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs
@@ -8505,7 +8505,7 @@ index 08e35f9e67a62..a8f20384dfd4b 100644
--
2.39.2
-From c074d7fd4b48c173719964a7762f88291e8aafcf Mon Sep 17 00:00:00 2001
+From 69dd6ae22927cb0bcfc89ec3c48cf10f3c60c6a6 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 10 Oct 2021 20:57:02 +0200
Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain
@@ -8542,7 +8542,7 @@ index 5b8d1a9620a5d..6a0ff035cf209 100644
--
2.39.2
-From 28f342329d830c64de3a57d3ed7ad0161359fb81 Mon Sep 17 00:00:00 2001
+From f173f220e38c37a1a94c4a5e8e8c42ae100c3758 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 28 Oct 2021 21:55:16 +0100
Subject: [PATCH] media: i2c: Add driver for DW9719 VCM
@@ -9046,7 +9046,7 @@ index 0000000000000..180b04d2a6b3a
--
2.39.2
-From 0f0e6dd8eb48ab5cb6d049f241126af635126418 Mon Sep 17 00:00:00 2001
+From 6e5868f069084ed599460c8c398dc32380116393 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 4 May 2022 23:21:45 +0100
Subject: [PATCH] media: ipu3-cio2: Move functionality from .complete() to
@@ -9161,7 +9161,7 @@ index 3b76a9d0383a8..38f9f4da1922e 100644
--
2.39.2
-From 835ee96ec7aefeca40ce4b35744eb85a40fe37ef Mon Sep 17 00:00:00 2001
+From 410025f973dcad262720ce57f21d7fa8217a6850 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 2 Jun 2022 22:15:56 +0100
Subject: [PATCH] media: ipu3-cio2: Re-add .complete() to ipu3-cio2
@@ -9204,7 +9204,7 @@ index 38f9f4da1922e..82681df7d794f 100644
--
2.39.2
-From 04a7e4a701fafe1ff32557630e9c64ca151bc595 Mon Sep 17 00:00:00 2001
+From 3483ce66a85601ff413dd456b0f1a8e85ed701db Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Fri, 15 Jul 2022 23:48:00 +0200
Subject: [PATCH] drivers/media/i2c: Fix DW9719 dependencies
@@ -9233,42 +9233,7 @@ index 8cfd7b6c4bf54..11b8acd7cc5fe 100644
--
2.39.2
-From 4030768801d17c223084175044afca54d7d7c1f1 Mon Sep 17 00:00:00 2001
-From: Daniel Scally <dan.scally@ideasonboard.com>
-Date: Fri, 24 Feb 2023 14:03:41 +0000
-Subject: [PATCH] platform/x86: int3472: Add GPIOs to Surface Go 3 Board data
-
-Add the INT347E GPIO lookup table to the board data for the Surface
-Go 3. This is necessary to allow the ov7251 IR camera to probe
-properly on that platform.
-
-Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
-Patchset: cameras
----
- drivers/platform/x86/intel/int3472/tps68470_board_data.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
-index 309eab9c05588..322237e056f32 100644
---- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
-+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
-@@ -159,9 +159,10 @@ static const struct int3472_tps68470_board_data surface_go_tps68470_board_data =
- static const struct int3472_tps68470_board_data surface_go3_tps68470_board_data = {
- .dev_name = "i2c-INT3472:01",
- .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
-- .n_gpiod_lookups = 1,
-+ .n_gpiod_lookups = 2,
- .tps68470_gpio_lookup_tables = {
-- &surface_go_int347a_gpios
-+ &surface_go_int347a_gpios,
-+ &surface_go_int347e_gpios,
- },
- };
-
---
-2.39.2
-
-From 89a6a3ed2cb5154b6dbda1350a553a7c983f5743 Mon Sep 17 00:00:00 2001
+From 7f2070b55cd5ec8e43b5db8e0df66963d88e2da7 Mon Sep 17 00:00:00 2001
From: Daniel Scally <dan.scally@ideasonboard.com>
Date: Thu, 2 Mar 2023 12:59:39 +0000
Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E
@@ -9324,7 +9289,1973 @@ index c42c3faa2c32d..6f4b8e24eb56c 100644
--
2.39.2
-From 1fc64bffeb5cb896510010058de37f1492b73129 Mon Sep 17 00:00:00 2001
+From 97690c551790b534a89fd81a06686e505cb0b580 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 20 Jan 2023 12:45:15 +0100
+Subject: [PATCH] leds: led-class: Add led_module_get() helper
+
+Split out part of of_led_get() into a generic led_module_get() helper
+function.
+
+This is a preparation patch for adding a generic (non devicetree specific)
+led_get() function.
+
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/leds/led-class.c | 31 ++++++++++++++++++-------------
+ 1 file changed, 18 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
+index aa39b2a48fdff..743d97b082dcb 100644
+--- a/drivers/leds/led-class.c
++++ b/drivers/leds/led-class.c
+@@ -215,6 +215,23 @@ static int led_resume(struct device *dev)
+
+ static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
+
++static struct led_classdev *led_module_get(struct device *led_dev)
++{
++ struct led_classdev *led_cdev;
++
++ if (!led_dev)
++ return ERR_PTR(-EPROBE_DEFER);
++
++ led_cdev = dev_get_drvdata(led_dev);
++
++ if (!try_module_get(led_cdev->dev->parent->driver->owner)) {
++ put_device(led_cdev->dev);
++ return ERR_PTR(-ENODEV);
++ }
++
++ return led_cdev;
++}
++
+ /**
+ * of_led_get() - request a LED device via the LED framework
+ * @np: device node to get the LED device from
+@@ -226,7 +243,6 @@ static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
+ struct led_classdev *of_led_get(struct device_node *np, int index)
+ {
+ struct device *led_dev;
+- struct led_classdev *led_cdev;
+ struct device_node *led_node;
+
+ led_node = of_parse_phandle(np, "leds", index);
+@@ -235,19 +251,8 @@ struct led_classdev *of_led_get(struct device_node *np, int index)
+
+ led_dev = class_find_device_by_of_node(leds_class, led_node);
+ of_node_put(led_node);
+- put_device(led_dev);
+-
+- if (!led_dev)
+- return ERR_PTR(-EPROBE_DEFER);
+-
+- led_cdev = dev_get_drvdata(led_dev);
+
+- if (!try_module_get(led_cdev->dev->parent->driver->owner)) {
+- put_device(led_cdev->dev);
+- return ERR_PTR(-ENODEV);
+- }
+-
+- return led_cdev;
++ return led_module_get(led_dev);
+ }
+ EXPORT_SYMBOL_GPL(of_led_get);
+
+--
+2.39.2
+
+From c3c12e4899c6d50c9063b6ec31fef6f1696dcb12 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 20 Jan 2023 12:45:16 +0100
+Subject: [PATCH] leds: led-class: Add __devm_led_get() helper
+
+Add a __devm_led_get() helper which registers a passed in led_classdev
+with devm for unregistration.
+
+This is a preparation patch for adding a generic (non devicetree specific)
+devm_led_get() function.
+
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/leds/led-class.c | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
+index 743d97b082dcb..4904d140a560a 100644
+--- a/drivers/leds/led-class.c
++++ b/drivers/leds/led-class.c
+@@ -274,6 +274,22 @@ static void devm_led_release(struct device *dev, void *res)
+ led_put(*p);
+ }
+
++static struct led_classdev *__devm_led_get(struct device *dev, struct led_classdev *led)
++{
++ struct led_classdev **dr;
++
++ dr = devres_alloc(devm_led_release, sizeof(struct led_classdev *), GFP_KERNEL);
++ if (!dr) {
++ led_put(led);
++ return ERR_PTR(-ENOMEM);
++ }
++
++ *dr = led;
++ devres_add(dev, dr);
++
++ return led;
++}
++
+ /**
+ * devm_of_led_get - Resource-managed request of a LED device
+ * @dev: LED consumer
+@@ -289,7 +305,6 @@ struct led_classdev *__must_check devm_of_led_get(struct device *dev,
+ int index)
+ {
+ struct led_classdev *led;
+- struct led_classdev **dr;
+
+ if (!dev)
+ return ERR_PTR(-EINVAL);
+@@ -298,17 +313,7 @@ struct led_classdev *__must_check devm_of_led_get(struct device *dev,
+ if (IS_ERR(led))
+ return led;
+
+- dr = devres_alloc(devm_led_release, sizeof(struct led_classdev *),
+- GFP_KERNEL);
+- if (!dr) {
+- led_put(led);
+- return ERR_PTR(-ENOMEM);
+- }
+-
+- *dr = led;
+- devres_add(dev, dr);
+-
+- return led;
++ return __devm_led_get(dev, led);
+ }
+ EXPORT_SYMBOL_GPL(devm_of_led_get);
+
+--
+2.39.2
+
+From 7eeab1b38fdd7e618425c38b1d7565da37fa4f9c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 20 Jan 2023 12:45:17 +0100
+Subject: [PATCH] leds: led-class: Add generic [devm_]led_get()
+
+Add a generic [devm_]led_get() method which can be used on both devicetree
+and non devicetree platforms to get a LED classdev associated with
+a specific function on a specific device, e.g. the privacy LED associated
+with a specific camera sensor.
+
+Note unlike of_led_get() this takes a string describing the function
+rather then an index. This is done because e.g. camera sensors might
+have a privacy LED, or a flash LED, or both and using an index
+approach leaves it unclear what the function of index 0 is if there is
+only 1 LED.
+
+This uses a lookup-table mechanism for non devicetree platforms.
+This allows the platform code to map specific LED class_dev-s to a specific
+device,function combinations this way.
+
+For devicetree platforms getting the LED by function-name could be made
+to work using the standard devicetree pattern of adding a -names string
+array to map names to the indexes.
+
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/leds/led-class.c | 84 ++++++++++++++++++++++++++++++++++++++++
+ include/linux/leds.h | 21 ++++++++++
+ 2 files changed, 105 insertions(+)
+
+diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
+index 4904d140a560a..0c4b8d8d2b4fe 100644
+--- a/drivers/leds/led-class.c
++++ b/drivers/leds/led-class.c
+@@ -23,6 +23,8 @@
+ #include "leds.h"
+
+ static struct class *leds_class;
++static DEFINE_MUTEX(leds_lookup_lock);
++static LIST_HEAD(leds_lookup_list);
+
+ static ssize_t brightness_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+@@ -317,6 +319,88 @@ struct led_classdev *__must_check devm_of_led_get(struct device *dev,
+ }
+ EXPORT_SYMBOL_GPL(devm_of_led_get);
+
++/**
++ * led_get() - request a LED device via the LED framework
++ * @dev: device for which to get the LED device
++ * @con_id: name of the LED from the device's point of view
++ *
++ * @return a pointer to a LED device or ERR_PTR(errno) on failure.
++ */
++struct led_classdev *led_get(struct device *dev, char *con_id)
++{
++ struct led_lookup_data *lookup;
++ const char *provider = NULL;
++ struct device *led_dev;
++
++ mutex_lock(&leds_lookup_lock);
++ list_for_each_entry(lookup, &leds_lookup_list, list) {
++ if (!strcmp(lookup->dev_id, dev_name(dev)) &&
++ !strcmp(lookup->con_id, con_id)) {
++ provider = kstrdup_const(lookup->provider, GFP_KERNEL);
++ break;
++ }
++ }
++ mutex_unlock(&leds_lookup_lock);
++
++ if (!provider)
++ return ERR_PTR(-ENOENT);
++
++ led_dev = class_find_device_by_name(leds_class, provider);
++ kfree_const(provider);
++
++ return led_module_get(led_dev);
++}
++EXPORT_SYMBOL_GPL(led_get);
++
++/**
++ * devm_led_get() - request a LED device via the LED framework
++ * @dev: device for which to get the LED device
++ * @con_id: name of the LED from the device's point of view
++ *
++ * The LED device returned from this function is automatically released
++ * on driver detach.
++ *
++ * @return a pointer to a LED device or ERR_PTR(errno) on failure.
++ */
++struct led_classdev *devm_led_get(struct device *dev, char *con_id)
++{
++ struct led_classdev *led;
++
++ led = led_get(dev, con_id);
++ if (IS_ERR(led))
++ return led;
++
++ return __devm_led_get(dev, led);
++}
++EXPORT_SYMBOL_GPL(devm_led_get);
++
++/**
++ * led_add_lookup() - Add a LED lookup table entry
++ * @led_lookup: the lookup table entry to add
++ *
++ * Add a LED lookup table entry. On systems without devicetree the lookup table
++ * is used by led_get() to find LEDs.
++ */
++void led_add_lookup(struct led_lookup_data *led_lookup)
++{
++ mutex_lock(&leds_lookup_lock);
++ list_add_tail(&led_lookup->list, &leds_lookup_list);
++ mutex_unlock(&leds_lookup_lock);
++}
++EXPORT_SYMBOL_GPL(led_add_lookup);
++
++/**
++ * led_remove_lookup() - Remove a LED lookup table entry
++ * @led_lookup: the lookup table entry to remove
++ */
++void led_remove_lookup(struct led_lookup_data *led_lookup)
++{
++ mutex_lock(&leds_lookup_lock);
++ list_del(&led_lookup->list);
++ mutex_unlock(&leds_lookup_lock);
++}
++EXPORT_SYMBOL_GPL(led_remove_lookup);
++
+ static int led_classdev_next_name(const char *init_name, char *name,
+ size_t len)
+ {
+diff --git a/include/linux/leds.h b/include/linux/leds.h
+index ba4861ec73d30..31cb74b90ffcd 100644
+--- a/include/linux/leds.h
++++ b/include/linux/leds.h
+@@ -39,6 +39,21 @@ enum led_default_state {
+ LEDS_DEFSTATE_KEEP = 2,
+ };
+
++/**
++ * struct led_lookup_data - represents a single LED lookup entry
++ *
++ * @list: internal list of all LED lookup entries
++ * @provider: name of led_classdev providing the LED
++ * @dev_id: name of the device associated with this LED
++ * @con_id: name of the LED from the device's point of view
++ */
++struct led_lookup_data {
++ struct list_head list;
++ const char *provider;
++ const char *dev_id;
++ const char *con_id;
++};
++
+ struct led_init_data {
+ /* device fwnode handle */
+ struct fwnode_handle *fwnode;
+@@ -211,6 +226,12 @@ void devm_led_classdev_unregister(struct device *parent,
+ void led_classdev_suspend(struct led_classdev *led_cdev);
+ void led_classdev_resume(struct led_classdev *led_cdev);
+
++void led_add_lookup(struct led_lookup_data *led_lookup);
++void led_remove_lookup(struct led_lookup_data *led_lookup);
++
++struct led_classdev *__must_check led_get(struct device *dev, char *con_id);
++struct led_classdev *__must_check devm_led_get(struct device *dev, char *con_id);
++
+ extern struct led_classdev *of_led_get(struct device_node *np, int index);
+ extern void led_put(struct led_classdev *led_cdev);
+ struct led_classdev *__must_check devm_of_led_get(struct device *dev,
+--
+2.39.2
+
+From ab557ada9fedca0fc3adf7c4718433be3fbca6aa Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 20 Jan 2023 12:45:18 +0100
+Subject: [PATCH] leds: led-class: Add devicetree support to led_get()
+
+Turn of_led_get() into a more generic __of_led_get() helper function,
+which can lookup LEDs in devicetree by either name or index.
+
+And use this new helper to add devicetree support to the generic
+(non devicetree specific) [devm_]led_get() function.
+
+This uses the standard devicetree pattern of adding a -names string array
+to map names to the indexes for an array of resources.
+
+Note the new led-names property for LED consumers is not added
+to the devicetree documentation because there seems to be no
+documentation for the leds property itself to extend it with this.
+It seems that how LED consumers should be described is not documented
+at all ATM.
+
+This patch is marked as RFC because of both the missing devicetree
+documentation and because there are no devicetree users of
+the generic [devm_]led_get() function for now.
+
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/leds/led-class.c | 37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
+index 0c4b8d8d2b4fe..2f3af6e302082 100644
+--- a/drivers/leds/led-class.c
++++ b/drivers/leds/led-class.c
+@@ -234,19 +234,18 @@ static struct led_classdev *led_module_get(struct device *led_dev)
+ return led_cdev;
+ }
+
+-/**
+- * of_led_get() - request a LED device via the LED framework
+- * @np: device node to get the LED device from
+- * @index: the index of the LED
+- *
+- * Returns the LED device parsed from the phandle specified in the "leds"
+- * property of a device tree node or a negative error-code on failure.
+- */
+-struct led_classdev *of_led_get(struct device_node *np, int index)
++static struct led_classdev *__of_led_get(struct device_node *np, int index,
++ const char *name)
+ {
+ struct device *led_dev;
+ struct device_node *led_node;
+
++ /*
++ * For named LEDs, first look up the name in the "led-names" property.
++ * If it cannot be found, then of_parse_phandle() will propagate the error.
++ */
++ if (name)
++ index = of_property_match_string(np, "led-names", name);
+ led_node = of_parse_phandle(np, "leds", index);
+ if (!led_node)
+ return ERR_PTR(-ENOENT);
+@@ -256,6 +255,19 @@ struct led_classdev *of_led_get(struct device_node *np, int index)
+
+ return led_module_get(led_dev);
+ }
++
++/**
++ * of_led_get() - request a LED device via the LED framework
++ * @np: device node to get the LED device from
++ * @index: the index of the LED
++ *
++ * Returns the LED device parsed from the phandle specified in the "leds"
++ * property of a device tree node or a negative error-code on failure.
++ */
++struct led_classdev *of_led_get(struct device_node *np, int index)
++{
++ return __of_led_get(np, index, NULL);
++}
+ EXPORT_SYMBOL_GPL(of_led_get);
+
+ /**
+@@ -329,9 +341,16 @@ EXPORT_SYMBOL_GPL(devm_of_led_get);
+ struct led_classdev *led_get(struct device *dev, char *con_id)
+ {
+ struct led_lookup_data *lookup;
++ struct led_classdev *led_cdev;
+ const char *provider = NULL;
+ struct device *led_dev;
+
++ if (dev->of_node) {
++ led_cdev = __of_led_get(dev->of_node, -1, con_id);
++ if (!IS_ERR(led_cdev) || PTR_ERR(led_cdev) != -ENOENT)
++ return led_cdev;
++ }
++
+ mutex_lock(&leds_lookup_lock);
+ list_for_each_entry(lookup, &leds_lookup_list, list) {
+ if (!strcmp(lookup->dev_id, dev_name(dev)) &&
+--
+2.39.2
+
+From 55eceffb0759ac51b7a673be947973360f4e37a0 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 20 Jan 2023 12:45:19 +0100
+Subject: [PATCH] media: v4l2-core: Built async and fwnode code into
+ videodev.ko
+
+Currently the videodev.ko code may be builtin while e.g. v4l2-fwnode.ko
+is build as a module.
+
+This makes it hard to add code depending on other subsystems spanning
+both videodev.ko and v4l2-fwnode.ko. Specifically this block adding code
+depending on the LED subsystem.
+
+This is made even harder because CONFIG_V4L2_FWNODE is selected,
+not depended on so it itself cannot depend on another subsystem without
+editing all the Kconfig symbols selecting it to also list the dependency
+and there are many of such symbols.
+
+Adding a "select LED_CLASS if NEW_LEDS" to CONFIG_V4L2_FWNODE leads
+to Kconfig erroring out with "error: recursive dependency detected!".
+
+To fix this dependency mess, change the V4L2_FWNODE and V4L2_ASYNC
+(which V4L2_FWNODE selects) Kconfig symbols from tristate to bools and
+link their code into videodev.ko instead of making them separate modules.
+
+This will allow using IS_REACHABLE(LED_CLASS) for the new LED integration
+code without needing to worry that it expands to 0 in some places and
+1 in other places because some of the code being builtin vs modular.
+
+On x86_64 this leads to the following size changes for videodev.ko
+
+[hans@shalem linux]$ size drivers/media/v4l2-core/videodev.ko
+
+Before:
+ text data bss dec hex filename
+ 218206 14395 2448 235049 39629 drivers/media/v4l2-core/videodev.ko
+After:
+ text data bss dec hex filename
+ 243213 17615 2456 263284 40474 drivers/media/v4l2-core/videodev.ko
+
+So (as expected) there is some increase in size here, but it
+really is not that much.
+
+And the uncompressed no-debuginfo .ko file disk-usage actually shrinks
+by 17 KiB (comparing the slightly larger videodev.ko against the
+3 original modules) and loading time will also be better.
+
+Acked-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/media/v4l2-core/Kconfig | 4 ++--
+ drivers/media/v4l2-core/Makefile | 4 ++--
+ drivers/media/v4l2-core/v4l2-async.c | 17 ++++-------------
+ drivers/media/v4l2-core/v4l2-dev-priv.h | 19 +++++++++++++++++++
+ drivers/media/v4l2-core/v4l2-dev.c | 8 ++++++++
+ drivers/media/v4l2-core/v4l2-fwnode.c | 6 ------
+ 6 files changed, 35 insertions(+), 23 deletions(-)
+ create mode 100644 drivers/media/v4l2-core/v4l2-dev-priv.h
+
+diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
+index 348559bc24689..73574d9460105 100644
+--- a/drivers/media/v4l2-core/Kconfig
++++ b/drivers/media/v4l2-core/Kconfig
+@@ -68,11 +68,11 @@ config V4L2_FLASH_LED_CLASS
+ When in doubt, say N.
+
+ config V4L2_FWNODE
+- tristate
++ bool
+ select V4L2_ASYNC
+
+ config V4L2_ASYNC
+- tristate
++ bool
+
+ # Used by drivers that need Videobuf modules
+ config VIDEOBUF_GEN
+diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile
+index 41d91bd10cf28..8c5a1ab8d939a 100644
+--- a/drivers/media/v4l2-core/Makefile
++++ b/drivers/media/v4l2-core/Makefile
+@@ -15,7 +15,9 @@ videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
+
+ # Please keep it alphabetically sorted by Kconfig name
+ # (e. g. LC_ALL=C sort Makefile)
++videodev-$(CONFIG_V4L2_ASYNC) += v4l2-async.o
+ videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o
++videodev-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o
+ videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o
+ videodev-$(CONFIG_SPI) += v4l2-spi.o
+ videodev-$(CONFIG_TRACEPOINTS) += v4l2-trace.o
+@@ -24,9 +26,7 @@ videodev-$(CONFIG_VIDEO_V4L2_I2C) += v4l2-i2c.o
+ # Please keep it alphabetically sorted by Kconfig name
+ # (e. g. LC_ALL=C sort Makefile)
+
+-obj-$(CONFIG_V4L2_ASYNC) += v4l2-async.o
+ obj-$(CONFIG_V4L2_FLASH_LED_CLASS) += v4l2-flash-led-class.o
+-obj-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o
+ obj-$(CONFIG_V4L2_H264) += v4l2-h264.o
+ obj-$(CONFIG_V4L2_JPEG_HELPER) += v4l2-jpeg.o
+ obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o
+diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
+index 2f1b718a91893..024d6b82b50af 100644
+--- a/drivers/media/v4l2-core/v4l2-async.c
++++ b/drivers/media/v4l2-core/v4l2-async.c
+@@ -11,7 +11,6 @@
+ #include <linux/i2c.h>
+ #include <linux/list.h>
+ #include <linux/mm.h>
+-#include <linux/module.h>
+ #include <linux/mutex.h>
+ #include <linux/of.h>
+ #include <linux/platform_device.h>
+@@ -24,6 +23,8 @@
+ #include <media/v4l2-fwnode.h>
+ #include <media/v4l2-subdev.h>
+
++#include "v4l2-dev-priv.h"
++
+ static int v4l2_async_nf_call_bound(struct v4l2_async_notifier *n,
+ struct v4l2_subdev *subdev,
+ struct v4l2_async_subdev *asd)
+@@ -900,25 +901,15 @@ DEFINE_SHOW_ATTRIBUTE(pending_subdevs);
+
+ static struct dentry *v4l2_async_debugfs_dir;
+
+-static int __init v4l2_async_init(void)
++void __init v4l2_async_debugfs_init(void)
+ {
+ v4l2_async_debugfs_dir = debugfs_create_dir("v4l2-async", NULL);
+ debugfs_create_file("pending_async_subdevices", 0444,
+ v4l2_async_debugfs_dir, NULL,
+ &pending_subdevs_fops);
+-
+- return 0;
+ }
+
+-static void __exit v4l2_async_exit(void)
++void __exit v4l2_async_debugfs_exit(void)
+ {
+ debugfs_remove_recursive(v4l2_async_debugfs_dir);
+ }
+-
+-subsys_initcall(v4l2_async_init);
+-module_exit(v4l2_async_exit);
+-
+-MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
+-MODULE_AUTHOR("Sakari Ailus <sakari.ailus@linux.intel.com>");
+-MODULE_AUTHOR("Ezequiel Garcia <ezequiel@collabora.com>");
+-MODULE_LICENSE("GPL");
+diff --git a/drivers/media/v4l2-core/v4l2-dev-priv.h b/drivers/media/v4l2-core/v4l2-dev-priv.h
+new file mode 100644
+index 0000000000000..b5b1ee78be20a
+--- /dev/null
++++ b/drivers/media/v4l2-core/v4l2-dev-priv.h
+@@ -0,0 +1,19 @@
++/* SPDX-License-Identifier: GPL-2.0-or-later */
++/*
++ * Video capture interface for Linux version 2 private header.
++ *
++ * Copyright (C) 2023 Hans de Goede <hdegoede@redhat.com>
++ */
++
++#ifndef _V4L2_DEV_PRIV_H_
++#define _V4L2_DEV_PRIV_H_
++
++#if IS_ENABLED(CONFIG_V4L2_ASYNC)
++void v4l2_async_debugfs_init(void);
++void v4l2_async_debugfs_exit(void);
++#else
++static inline void v4l2_async_debugfs_init(void) {}
++static inline void v4l2_async_debugfs_exit(void) {}
++#endif
++
++#endif
+diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
+index 397d553177fa7..10ba2e4196a65 100644
+--- a/drivers/media/v4l2-core/v4l2-dev.c
++++ b/drivers/media/v4l2-core/v4l2-dev.c
+@@ -31,6 +31,8 @@
+ #include <media/v4l2-ioctl.h>
+ #include <media/v4l2-event.h>
+
++#include "v4l2-dev-priv.h"
++
+ #define VIDEO_NUM_DEVICES 256
+ #define VIDEO_NAME "video4linux"
+
+@@ -1190,6 +1192,7 @@ static int __init videodev_init(void)
+ return -EIO;
+ }
+
++ v4l2_async_debugfs_init();
+ return 0;
+ }
+
+@@ -1197,6 +1200,7 @@ static void __exit videodev_exit(void)
+ {
+ dev_t dev = MKDEV(VIDEO_MAJOR, 0);
+
++ v4l2_async_debugfs_exit();
+ class_unregister(&video_class);
+ unregister_chrdev_region(dev, VIDEO_NUM_DEVICES);
+ }
+@@ -1205,6 +1209,10 @@ subsys_initcall(videodev_init);
+ module_exit(videodev_exit)
+
+ MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab <mchehab@kernel.org>, Bill Dirks, Justin Schoeman, Gerd Knorr");
++MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
++MODULE_AUTHOR("Sakari Ailus <sakari.ailus@linux.intel.com>");
++MODULE_AUTHOR("Ezequiel Garcia <ezequiel@collabora.com>");
++MODULE_AUTHOR("Sylwester Nawrocki <s.nawrocki@samsung.com>");
+ MODULE_DESCRIPTION("Video4Linux2 core driver");
+ MODULE_LICENSE("GPL");
+ MODULE_ALIAS_CHARDEV_MAJOR(VIDEO_MAJOR);
+diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
+index 3d9533c1b2029..c8a2264262bca 100644
+--- a/drivers/media/v4l2-core/v4l2-fwnode.c
++++ b/drivers/media/v4l2-core/v4l2-fwnode.c
+@@ -17,7 +17,6 @@
+ #include <linux/acpi.h>
+ #include <linux/kernel.h>
+ #include <linux/mm.h>
+-#include <linux/module.h>
+ #include <linux/of.h>
+ #include <linux/property.h>
+ #include <linux/slab.h>
+@@ -1328,8 +1327,3 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
+ return ret;
+ }
+ EXPORT_SYMBOL_GPL(v4l2_async_register_subdev_sensor);
+-
+-MODULE_LICENSE("GPL");
+-MODULE_AUTHOR("Sakari Ailus <sakari.ailus@linux.intel.com>");
+-MODULE_AUTHOR("Sylwester Nawrocki <s.nawrocki@samsung.com>");
+-MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
+--
+2.39.2
+
+From 994585e34879b2175846546af49dcb7b2c5c5d9b Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 27 Jan 2023 21:37:25 +0100
+Subject: [PATCH] media: v4l2-core: Make the v4l2-core code enable/disable the
+ privacy LED if present
+
+Make v4l2_async_register_subdev_sensor() try to get a privacy LED
+associated with the sensor and extend the call_s_stream() wrapper to
+enable/disable the privacy LED if found.
+
+This makes the core handle privacy LED control, rather then having to
+duplicate this code in all the sensor drivers.
+
+Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Acked-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/media/v4l2-core/v4l2-async.c | 3 ++
+ drivers/media/v4l2-core/v4l2-fwnode.c | 7 ++++
+ drivers/media/v4l2-core/v4l2-subdev-priv.h | 14 +++++++
+ drivers/media/v4l2-core/v4l2-subdev.c | 44 ++++++++++++++++++++++
+ include/media/v4l2-subdev.h | 3 ++
+ 5 files changed, 71 insertions(+)
+ create mode 100644 drivers/media/v4l2-core/v4l2-subdev-priv.h
+
+diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
+index 024d6b82b50af..b26dcb8d423e1 100644
+--- a/drivers/media/v4l2-core/v4l2-async.c
++++ b/drivers/media/v4l2-core/v4l2-async.c
+@@ -24,6 +24,7 @@
+ #include <media/v4l2-subdev.h>
+
+ #include "v4l2-dev-priv.h"
++#include "v4l2-subdev-priv.h"
+
+ static int v4l2_async_nf_call_bound(struct v4l2_async_notifier *n,
+ struct v4l2_subdev *subdev,
+@@ -823,6 +824,8 @@ void v4l2_async_unregister_subdev(struct v4l2_subdev *sd)
+ if (!sd->async_list.next)
+ return;
+
++ v4l2_subdev_put_privacy_led(sd);
++
+ mutex_lock(&list_lock);
+
+ __v4l2_async_nf_unregister(sd->subdev_notifier);
+diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
+index c8a2264262bca..8501b6931d3a0 100644
+--- a/drivers/media/v4l2-core/v4l2-fwnode.c
++++ b/drivers/media/v4l2-core/v4l2-fwnode.c
+@@ -27,6 +27,8 @@
+ #include <media/v4l2-fwnode.h>
+ #include <media/v4l2-subdev.h>
+
++#include "v4l2-subdev-priv.h"
++
+ static const struct v4l2_fwnode_bus_conv {
+ enum v4l2_fwnode_bus_type fwnode_bus_type;
+ enum v4l2_mbus_type mbus_type;
+@@ -1301,6 +1303,10 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
+
+ v4l2_async_nf_init(notifier);
+
++ ret = v4l2_subdev_get_privacy_led(sd);
++ if (ret < 0)
++ goto out_cleanup;
++
+ ret = v4l2_async_nf_parse_fwnode_sensor(sd->dev, notifier);
+ if (ret < 0)
+ goto out_cleanup;
+@@ -1321,6 +1327,7 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
+ v4l2_async_nf_unregister(notifier);
+
+ out_cleanup:
++ v4l2_subdev_put_privacy_led(sd);
+ v4l2_async_nf_cleanup(notifier);
+ kfree(notifier);
+
+diff --git a/drivers/media/v4l2-core/v4l2-subdev-priv.h b/drivers/media/v4l2-core/v4l2-subdev-priv.h
+new file mode 100644
+index 0000000000000..7ad2812c3d8e3
+--- /dev/null
++++ b/drivers/media/v4l2-core/v4l2-subdev-priv.h
+@@ -0,0 +1,14 @@
++/* SPDX-License-Identifier: GPL-2.0-or-later */
++/*
++ * V4L2 sub-device pivate header.
++ *
++ * Copyright (C) 2023 Hans de Goede <hdegoede@redhat.com>
++ */
++
++#ifndef _V4L2_SUBDEV_PRIV_H_
++#define _V4L2_SUBDEV_PRIV_H_
++
++int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd);
++void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd);
++
++#endif
+diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
+index 4988a25bd8f46..9fd1836282859 100644
+--- a/drivers/media/v4l2-core/v4l2-subdev.c
++++ b/drivers/media/v4l2-core/v4l2-subdev.c
+@@ -9,6 +9,7 @@
+ */
+
+ #include <linux/ioctl.h>
++#include <linux/leds.h>
+ #include <linux/mm.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
+@@ -23,6 +24,8 @@
+ #include <media/v4l2-fh.h>
+ #include <media/v4l2-event.h>
+
++#include "v4l2-subdev-priv.h"
++
+ #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
+ static int subdev_fh_init(struct v4l2_subdev_fh *fh, struct v4l2_subdev *sd)
+ {
+@@ -322,6 +325,14 @@ static int call_s_stream(struct v4l2_subdev *sd, int enable)
+ {
+ int ret;
+
++#if IS_REACHABLE(CONFIG_LEDS_CLASS)
++ if (!IS_ERR_OR_NULL(sd->privacy_led)) {
++ if (enable)
++ led_set_brightness(sd->privacy_led, sd->privacy_led->max_brightness);
++ else
++ led_set_brightness(sd->privacy_led, 0);
++ }
++#endif
+ ret = sd->ops->video->s_stream(sd, enable);
+
+ if (!enable && ret < 0) {
+@@ -1090,6 +1101,7 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
+ sd->grp_id = 0;
+ sd->dev_priv = NULL;
+ sd->host_priv = NULL;
++ sd->privacy_led = NULL;
+ #if defined(CONFIG_MEDIA_CONTROLLER)
+ sd->entity.name = sd->name;
+ sd->entity.obj_type = MEDIA_ENTITY_TYPE_V4L2_SUBDEV;
+@@ -1105,3 +1117,35 @@ void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
+ v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT, (void *)ev);
+ }
+ EXPORT_SYMBOL_GPL(v4l2_subdev_notify_event);
++
++int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd)
++{
++#if IS_REACHABLE(CONFIG_LEDS_CLASS)
++ sd->privacy_led = led_get(sd->dev, "privacy-led");
++ if (IS_ERR(sd->privacy_led) && PTR_ERR(sd->privacy_led) != -ENOENT)
++ return dev_err_probe(sd->dev, PTR_ERR(sd->privacy_led), "getting privacy LED\n");
++
++ if (!IS_ERR_OR_NULL(sd->privacy_led)) {
++ mutex_lock(&sd->privacy_led->led_access);
++ led_sysfs_disable(sd->privacy_led);
++ led_trigger_remove(sd->privacy_led);
++ led_set_brightness(sd->privacy_led, 0);
++ mutex_unlock(&sd->privacy_led->led_access);
++ }
++#endif
++ return 0;
++}
++EXPORT_SYMBOL_GPL(v4l2_subdev_get_privacy_led);
++
++void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd)
++{
++#if IS_REACHABLE(CONFIG_LEDS_CLASS)
++ if (!IS_ERR_OR_NULL(sd->privacy_led)) {
++ mutex_lock(&sd->privacy_led->led_access);
++ led_sysfs_enable(sd->privacy_led);
++ mutex_unlock(&sd->privacy_led->led_access);
++ led_put(sd->privacy_led);
++ }
++#endif
++}
++EXPORT_SYMBOL_GPL(v4l2_subdev_put_privacy_led);
+diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
+index b15fa9930f30c..0547313f98cc4 100644
+--- a/include/media/v4l2-subdev.h
++++ b/include/media/v4l2-subdev.h
+@@ -38,6 +38,7 @@ struct v4l2_subdev;
+ struct v4l2_subdev_fh;
+ struct tuner_setup;
+ struct v4l2_mbus_frame_desc;
++struct led_classdev;
+
+ /**
+ * struct v4l2_decode_vbi_line - used to decode_vbi_line
+@@ -982,6 +983,8 @@ struct v4l2_subdev {
+ * appropriate functions.
+ */
+
++ struct led_classdev *privacy_led;
++
+ /*
+ * TODO: active_state should most likely be changed from a pointer to an
+ * embedded field. For the time being it's kept as a pointer to more
+--
+2.39.2
+
+From 1430112e095cab678a7d1a607e5ae7b201c8fdbf Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 27 Jan 2023 21:37:26 +0100
+Subject: [PATCH] platform/x86: int3472/discrete: Refactor GPIO to sensor
+ mapping
+
+Add a helper function to map the type returned by the _DSM
+method to a function name + the default polarity for that function.
+
+And fold the INT3472_GPIO_TYPE_RESET and INT3472_GPIO_TYPE_POWERDOWN
+cases into a single generic case.
+
+This is a preparation patch for further GPIO mapping changes.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/platform/x86/intel/int3472/discrete.c | 45 +++++++++++++++----
+ 1 file changed, 36 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
+index 6f4b8e24eb56c..443f8dcb1e733 100644
+--- a/drivers/platform/x86/intel/int3472/discrete.c
++++ b/drivers/platform/x86/intel/int3472/discrete.c
+@@ -202,6 +202,36 @@ static int skl_int3472_map_gpio_to_clk(struct int3472_discrete_device *int3472,
+ return 0;
+ }
+
++static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polarity)
++{
++ switch (type) {
++ case INT3472_GPIO_TYPE_RESET:
++ *func = "reset";
++ *polarity = GPIO_ACTIVE_LOW;
++ break;
++ case INT3472_GPIO_TYPE_POWERDOWN:
++ *func = "powerdown";
++ *polarity = GPIO_ACTIVE_LOW;
++ break;
++ case INT3472_GPIO_TYPE_CLK_ENABLE:
++ *func = "clk-enable";
++ *polarity = GPIO_ACTIVE_HIGH;
++ break;
++ case INT3472_GPIO_TYPE_PRIVACY_LED:
++ *func = "privacy-led";
++ *polarity = GPIO_ACTIVE_HIGH;
++ break;
++ case INT3472_GPIO_TYPE_POWER_ENABLE:
++ *func = "power-enable";
++ *polarity = GPIO_ACTIVE_HIGH;
++ break;
++ default:
++ *func = "unknown";
++ *polarity = GPIO_ACTIVE_HIGH;
++ break;
++ }
++}
++
+ /**
+ * skl_int3472_handle_gpio_resources: Map PMIC resources to consuming sensor
+ * @ares: A pointer to a &struct acpi_resource
+@@ -241,6 +271,8 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+ struct acpi_resource_gpio *agpio;
+ union acpi_object *obj;
+ const char *err_msg;
++ const char *func;
++ u32 polarity;
+ int ret;
+ u8 type;
+
+@@ -264,19 +296,14 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+
+ type = obj->integer.value & 0xff;
+
++ int3472_get_func_and_polarity(type, &func, &polarity);
++
+ switch (type) {
+ case INT3472_GPIO_TYPE_RESET:
+- ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "reset",
+- GPIO_ACTIVE_LOW);
+- if (ret)
+- err_msg = "Failed to map reset pin to sensor\n";
+-
+- break;
+ case INT3472_GPIO_TYPE_POWERDOWN:
+- ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "powerdown",
+- GPIO_ACTIVE_LOW);
++ ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, func, polarity);
+ if (ret)
+- err_msg = "Failed to map powerdown pin to sensor\n";
++ err_msg = "Failed to map GPIO pin to sensor\n";
+
+ break;
+ case INT3472_GPIO_TYPE_CLK_ENABLE:
+--
+2.39.2
+
+From 96de58ea6f040db5c4e2bc17be391377a9de6221 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 27 Jan 2023 21:37:27 +0100
+Subject: [PATCH] platform/x86: int3472/discrete: Create a LED class device for
+ the privacy LED
+
+On some systems, e.g. the Lenovo ThinkPad X1 Yoga gen 7 and the ThinkPad
+X1 Nano gen 2 there is no clock-enable pin, triggering the:
+"No clk GPIO. The privacy LED won't work" warning and causing the privacy
+LED to not work.
+
+Fix this by modeling the privacy LED as a LED class device rather then
+integrating it with the registered clock.
+
+Note this relies on media subsys changes to actually turn the LED on/off
+when the sensor's v4l2_subdev's s_stream() operand gets called.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ drivers/platform/x86/intel/int3472/Makefile | 2 +-
+ .../x86/intel/int3472/clk_and_regulator.c | 3 -
+ drivers/platform/x86/intel/int3472/common.h | 15 +++-
+ drivers/platform/x86/intel/int3472/discrete.c | 58 ++++-----------
+ drivers/platform/x86/intel/int3472/led.c | 74 +++++++++++++++++++
+ 5 files changed, 105 insertions(+), 47 deletions(-)
+ create mode 100644 drivers/platform/x86/intel/int3472/led.c
+
+diff --git a/drivers/platform/x86/intel/int3472/Makefile b/drivers/platform/x86/intel/int3472/Makefile
+index cfec7784c5c93..9f16cb5143973 100644
+--- a/drivers/platform/x86/intel/int3472/Makefile
++++ b/drivers/platform/x86/intel/int3472/Makefile
+@@ -1,4 +1,4 @@
+ obj-$(CONFIG_INTEL_SKL_INT3472) += intel_skl_int3472_discrete.o \
+ intel_skl_int3472_tps68470.o
+-intel_skl_int3472_discrete-y := discrete.o clk_and_regulator.o common.o
++intel_skl_int3472_discrete-y := discrete.o clk_and_regulator.o led.o common.o
+ intel_skl_int3472_tps68470-y := tps68470.o tps68470_board_data.o common.o
+diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+index 74dc2cff799ee..e3b597d933880 100644
+--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
++++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+@@ -23,8 +23,6 @@ static int skl_int3472_clk_prepare(struct clk_hw *hw)
+ struct int3472_gpio_clock *clk = to_int3472_clk(hw);
+
+ gpiod_set_value_cansleep(clk->ena_gpio, 1);
+- gpiod_set_value_cansleep(clk->led_gpio, 1);
+-
+ return 0;
+ }
+
+@@ -33,7 +31,6 @@ static void skl_int3472_clk_unprepare(struct clk_hw *hw)
+ struct int3472_gpio_clock *clk = to_int3472_clk(hw);
+
+ gpiod_set_value_cansleep(clk->ena_gpio, 0);
+- gpiod_set_value_cansleep(clk->led_gpio, 0);
+ }
+
+ static int skl_int3472_clk_enable(struct clk_hw *hw)
+diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
+index 53270d19c73ab..82dc37e08882e 100644
+--- a/drivers/platform/x86/intel/int3472/common.h
++++ b/drivers/platform/x86/intel/int3472/common.h
+@@ -6,6 +6,7 @@
+
+ #include <linux/clk-provider.h>
+ #include <linux/gpio/machine.h>
++#include <linux/leds.h>
+ #include <linux/regulator/driver.h>
+ #include <linux/regulator/machine.h>
+ #include <linux/types.h>
+@@ -28,6 +29,8 @@
+ #define GPIO_REGULATOR_NAME_LENGTH 21
+ #define GPIO_REGULATOR_SUPPLY_NAME_LENGTH 9
+
++#define INT3472_LED_MAX_NAME_LEN 32
++
+ #define CIO2_SENSOR_SSDB_MCLKSPEED_OFFSET 86
+
+ #define INT3472_REGULATOR(_name, _supply, _ops) \
+@@ -96,10 +99,16 @@ struct int3472_discrete_device {
+ struct clk_hw clk_hw;
+ struct clk_lookup *cl;
+ struct gpio_desc *ena_gpio;
+- struct gpio_desc *led_gpio;
+ u32 frequency;
+ } clock;
+
++ struct int3472_pled {
++ struct led_classdev classdev;
++ struct led_lookup_data lookup;
++ char name[INT3472_LED_MAX_NAME_LEN];
++ struct gpio_desc *gpio;
++ } pled;
++
+ unsigned int ngpios; /* how many GPIOs have we seen */
+ unsigned int n_sensor_gpios; /* how many have we mapped to sensor */
+ struct gpiod_lookup_table gpios;
+@@ -119,4 +128,8 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
+ struct acpi_resource_gpio *agpio);
+ void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472);
+
++int skl_int3472_register_pled(struct int3472_discrete_device *int3472,
++ struct acpi_resource_gpio *agpio, u32 polarity);
++void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472);
++
+ #endif
+diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
+index 443f8dcb1e733..67d26f8a8d9a3 100644
+--- a/drivers/platform/x86/intel/int3472/discrete.c
++++ b/drivers/platform/x86/intel/int3472/discrete.c
+@@ -169,37 +169,21 @@ static int skl_int3472_map_gpio_to_sensor(struct int3472_discrete_device *int347
+ }
+
+ static int skl_int3472_map_gpio_to_clk(struct int3472_discrete_device *int3472,
+- struct acpi_resource_gpio *agpio, u8 type)
++ struct acpi_resource_gpio *agpio)
+ {
+ char *path = agpio->resource_source.string_ptr;
+ u16 pin = agpio->pin_table[0];
+ struct gpio_desc *gpio;
+
+- switch (type) {
+- case INT3472_GPIO_TYPE_CLK_ENABLE:
+- gpio = acpi_get_and_request_gpiod(path, pin, "int3472,clk-enable");
+- if (IS_ERR(gpio))
+- return (PTR_ERR(gpio));
+-
+- int3472->clock.ena_gpio = gpio;
+- /* Ensure the pin is in output mode and non-active state */
+- gpiod_direction_output(int3472->clock.ena_gpio, 0);
+- break;
+- case INT3472_GPIO_TYPE_PRIVACY_LED:
+- gpio = acpi_get_and_request_gpiod(path, pin, "int3472,privacy-led");
+- if (IS_ERR(gpio))
+- return (PTR_ERR(gpio));
++ gpio = acpi_get_and_request_gpiod(path, pin, "int3472,clk-enable");
++ if (IS_ERR(gpio))
++ return (PTR_ERR(gpio));
+
+- int3472->clock.led_gpio = gpio;
+- /* Ensure the pin is in output mode and non-active state */
+- gpiod_direction_output(int3472->clock.led_gpio, 0);
+- break;
+- default:
+- dev_err(int3472->dev, "Invalid GPIO type 0x%02x for clock\n", type);
+- break;
+- }
++ int3472->clock.ena_gpio = gpio;
++ /* Ensure the pin is in output mode and non-active state */
++ gpiod_direction_output(int3472->clock.ena_gpio, 0);
+
+- return 0;
++ return skl_int3472_register_clock(int3472);
+ }
+
+ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polarity)
+@@ -307,11 +291,16 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+
+ break;
+ case INT3472_GPIO_TYPE_CLK_ENABLE:
+- case INT3472_GPIO_TYPE_PRIVACY_LED:
+- ret = skl_int3472_map_gpio_to_clk(int3472, agpio, type);
++ ret = skl_int3472_map_gpio_to_clk(int3472, agpio);
+ if (ret)
+ err_msg = "Failed to map GPIO to clock\n";
+
++ break;
++ case INT3472_GPIO_TYPE_PRIVACY_LED:
++ ret = skl_int3472_register_pled(int3472, agpio, polarity);
++ if (ret)
++ err_msg = "Failed to register LED\n";
++
+ break;
+ case INT3472_GPIO_TYPE_POWER_ENABLE:
+ ret = skl_int3472_register_regulator(int3472, agpio);
+@@ -355,21 +344,6 @@ static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472)
+
+ acpi_dev_free_resource_list(&resource_list);
+
+- /*
+- * If we find no clock enable GPIO pin then the privacy LED won't work.
+- * We've never seen that situation, but it's possible. Warn the user so
+- * it's clear what's happened.
+- */
+- if (int3472->clock.ena_gpio) {
+- ret = skl_int3472_register_clock(int3472);
+- if (ret)
+- return ret;
+- } else {
+- if (int3472->clock.led_gpio)
+- dev_warn(int3472->dev,
+- "No clk GPIO. The privacy LED won't work\n");
+- }
+-
+ int3472->gpios.dev_id = int3472->sensor_name;
+ gpiod_add_lookup_table(&int3472->gpios);
+
+@@ -386,8 +360,8 @@ static int skl_int3472_discrete_remove(struct platform_device *pdev)
+ skl_int3472_unregister_clock(int3472);
+
+ gpiod_put(int3472->clock.ena_gpio);
+- gpiod_put(int3472->clock.led_gpio);
+
++ skl_int3472_unregister_pled(int3472);
+ skl_int3472_unregister_regulator(int3472);
+
+ return 0;
+diff --git a/drivers/platform/x86/intel/int3472/led.c b/drivers/platform/x86/intel/int3472/led.c
+new file mode 100644
+index 0000000000000..251c6524458e7
+--- /dev/null
++++ b/drivers/platform/x86/intel/int3472/led.c
+@@ -0,0 +1,74 @@
++// SPDX-License-Identifier: GPL-2.0
++/* Author: Hans de Goede <hdegoede@redhat.com> */
++
++#include <linux/acpi.h>
++#include <linux/gpio/consumer.h>
++#include <linux/leds.h>
++#include "common.h"
++
++static int int3472_pled_set(struct led_classdev *led_cdev,
++ enum led_brightness brightness)
++{
++ struct int3472_discrete_device *int3472 =
++ container_of(led_cdev, struct int3472_discrete_device, pled.classdev);
++
++ gpiod_set_value_cansleep(int3472->pled.gpio, brightness);
++ return 0;
++}
++
++int skl_int3472_register_pled(struct int3472_discrete_device *int3472,
++ struct acpi_resource_gpio *agpio, u32 polarity)
++{
++ char *p, *path = agpio->resource_source.string_ptr;
++ int ret;
++
++ if (int3472->pled.classdev.dev)
++ return -EBUSY;
++
++ int3472->pled.gpio = acpi_get_and_request_gpiod(path, agpio->pin_table[0],
++ "int3472,privacy-led");
++ if (IS_ERR(int3472->pled.gpio))
++ return dev_err_probe(int3472->dev, PTR_ERR(int3472->pled.gpio),
++ "getting privacy LED GPIO\n");
++
++ if (polarity == GPIO_ACTIVE_LOW)
++ gpiod_toggle_active_low(int3472->pled.gpio);
++
++ /* Ensure the pin is in output mode and non-active state */
++ gpiod_direction_output(int3472->pled.gpio, 0);
++
++ /* Generate the name, replacing the ':' in the ACPI devname with '_' */
++ snprintf(int3472->pled.name, sizeof(int3472->pled.name),
++ "%s::privacy_led", acpi_dev_name(int3472->sensor));
++ p = strchr(int3472->pled.name, ':');
++ *p = '_';
++
++ int3472->pled.classdev.name = int3472->pled.name;
++ int3472->pled.classdev.max_brightness = 1;
++ int3472->pled.classdev.brightness_set_blocking = int3472_pled_set;
++
++ ret = led_classdev_register(int3472->dev, &int3472->pled.classdev);
++ if (ret)
++ goto err_free_gpio;
++
++ int3472->pled.lookup.provider = int3472->pled.name;
++ int3472->pled.lookup.dev_id = int3472->sensor_name;
++ int3472->pled.lookup.con_id = "privacy-led";
++ led_add_lookup(&int3472->pled.lookup);
++
++ return 0;
++
++err_free_gpio:
++ gpiod_put(int3472->pled.gpio);
++ return ret;
++}
++
++void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472)
++{
++ if (IS_ERR_OR_NULL(int3472->pled.classdev.dev))
++ return;
++
++ led_remove_lookup(&int3472->pled.lookup);
++ led_classdev_unregister(&int3472->pled.classdev);
++ gpiod_put(int3472->pled.gpio);
++}
+--
+2.39.2
+
+From 4531005ab76adfc94a54e1b4d60b5769b1317b7b Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 27 Jan 2023 21:37:28 +0100
+Subject: [PATCH] platform/x86: int3472/discrete: Move GPIO request to
+ skl_int3472_register_clock()
+
+Move the requesting of the clk-enable GPIO to skl_int3472_register_clock()
+(and move the gpiod_put to unregister).
+
+This mirrors the GPIO handling in skl_int3472_register_regulator() and
+allows removing skl_int3472_map_gpio_to_clk() from discrete.c.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ .../x86/intel/int3472/clk_and_regulator.c | 28 +++++++++++++++--
+ drivers/platform/x86/intel/int3472/common.h | 3 +-
+ drivers/platform/x86/intel/int3472/discrete.c | 30 ++-----------------
+ 3 files changed, 30 insertions(+), 31 deletions(-)
+
+diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+index e3b597d933880..626e5e86f4e0c 100644
+--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
++++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+@@ -86,18 +86,34 @@ static const struct clk_ops skl_int3472_clock_ops = {
+ .recalc_rate = skl_int3472_clk_recalc_rate,
+ };
+
+-int skl_int3472_register_clock(struct int3472_discrete_device *int3472)
++int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
++ struct acpi_resource_gpio *agpio)
+ {
++ char *path = agpio->resource_source.string_ptr;
+ struct clk_init_data init = {
+ .ops = &skl_int3472_clock_ops,
+ .flags = CLK_GET_RATE_NOCACHE,
+ };
+ int ret;
+
++ if (int3472->clock.cl)
++ return -EBUSY;
++
++ int3472->clock.ena_gpio = acpi_get_and_request_gpiod(path, agpio->pin_table[0],
++ "int3472,clk-enable");
++ if (IS_ERR(int3472->clock.ena_gpio))
++ return dev_err_probe(int3472->dev, PTR_ERR(int3472->clock.ena_gpio),
++ "getting clk-enable GPIO\n");
++
++ /* Ensure the pin is in output mode and non-active state */
++ gpiod_direction_output(int3472->clock.ena_gpio, 0);
++
+ init.name = kasprintf(GFP_KERNEL, "%s-clk",
+ acpi_dev_name(int3472->adev));
+- if (!init.name)
+- return -ENOMEM;
++ if (!init.name) {
++ ret = -ENOMEM;
++ goto out_put_gpio;
++ }
+
+ int3472->clock.frequency = skl_int3472_get_clk_frequency(int3472);
+
+@@ -123,14 +139,20 @@ int skl_int3472_register_clock(struct int3472_discrete_device *int3472)
+ clk_unregister(int3472->clock.clk);
+ out_free_init_name:
+ kfree(init.name);
++out_put_gpio:
++ gpiod_put(int3472->clock.ena_gpio);
+
+ return ret;
+ }
+
+ void skl_int3472_unregister_clock(struct int3472_discrete_device *int3472)
+ {
++ if (!int3472->clock.cl)
++ return;
++
+ clkdev_drop(int3472->clock.cl);
+ clk_unregister(int3472->clock.clk);
++ gpiod_put(int3472->clock.ena_gpio);
+ }
+
+ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
+diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
+index 82dc37e08882e..0d4fa7d00b5f6 100644
+--- a/drivers/platform/x86/intel/int3472/common.h
++++ b/drivers/platform/x86/intel/int3472/common.h
+@@ -121,7 +121,8 @@ int skl_int3472_get_sensor_adev_and_name(struct device *dev,
+ struct acpi_device **sensor_adev_ret,
+ const char **name_ret);
+
+-int skl_int3472_register_clock(struct int3472_discrete_device *int3472);
++int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
++ struct acpi_resource_gpio *agpio);
+ void skl_int3472_unregister_clock(struct int3472_discrete_device *int3472);
+
+ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
+diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
+index 67d26f8a8d9a3..7bac0dd850c83 100644
+--- a/drivers/platform/x86/intel/int3472/discrete.c
++++ b/drivers/platform/x86/intel/int3472/discrete.c
+@@ -2,8 +2,6 @@
+ /* Author: Dan Scally <djrscally@gmail.com> */
+
+ #include <linux/acpi.h>
+-#include <linux/clkdev.h>
+-#include <linux/clk-provider.h>
+ #include <linux/device.h>
+ #include <linux/gpio/consumer.h>
+ #include <linux/gpio/machine.h>
+@@ -168,24 +166,6 @@ static int skl_int3472_map_gpio_to_sensor(struct int3472_discrete_device *int347
+ return 0;
+ }
+
+-static int skl_int3472_map_gpio_to_clk(struct int3472_discrete_device *int3472,
+- struct acpi_resource_gpio *agpio)
+-{
+- char *path = agpio->resource_source.string_ptr;
+- u16 pin = agpio->pin_table[0];
+- struct gpio_desc *gpio;
+-
+- gpio = acpi_get_and_request_gpiod(path, pin, "int3472,clk-enable");
+- if (IS_ERR(gpio))
+- return (PTR_ERR(gpio));
+-
+- int3472->clock.ena_gpio = gpio;
+- /* Ensure the pin is in output mode and non-active state */
+- gpiod_direction_output(int3472->clock.ena_gpio, 0);
+-
+- return skl_int3472_register_clock(int3472);
+-}
+-
+ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polarity)
+ {
+ switch (type) {
+@@ -291,9 +271,9 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+
+ break;
+ case INT3472_GPIO_TYPE_CLK_ENABLE:
+- ret = skl_int3472_map_gpio_to_clk(int3472, agpio);
++ ret = skl_int3472_register_clock(int3472, agpio);
+ if (ret)
+- err_msg = "Failed to map GPIO to clock\n";
++ err_msg = "Failed to register clock\n";
+
+ break;
+ case INT3472_GPIO_TYPE_PRIVACY_LED:
+@@ -356,11 +336,7 @@ static int skl_int3472_discrete_remove(struct platform_device *pdev)
+
+ gpiod_remove_lookup_table(&int3472->gpios);
+
+- if (int3472->clock.cl)
+- skl_int3472_unregister_clock(int3472);
+-
+- gpiod_put(int3472->clock.ena_gpio);
+-
++ skl_int3472_unregister_clock(int3472);
+ skl_int3472_unregister_pled(int3472);
+ skl_int3472_unregister_regulator(int3472);
+
+--
+2.39.2
+
+From c832b5f738a2e774ef5e9e7891701ef71861196a Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 27 Jan 2023 21:37:29 +0100
+Subject: [PATCH] platform/x86: int3472/discrete: Get the polarity from the
+ _DSM entry
+
+According to:
+https://github.com/intel/ipu6-drivers/blob/master/patch/int3472-support-independent-clock-and-LED-gpios-5.17%2B.patch
+
+Bits 31-24 of the _DSM pin entry integer value codes the active-value,
+that is the actual physical signal (0 or 1) which needs to be output on
+the pin to turn the sensor chip on (to make it active).
+
+So if bits 31-24 are 0 for a reset pin, then the actual value of the reset
+pin needs to be 0 to take the chip out of reset. IOW in this case the reset
+signal is active-high rather then the default active-low.
+
+And if bits 31-24 are 0 for a clk-en pin then the actual value of the clk
+pin needs to be 0 to enable the clk. So in this case the clk-en signal
+is active-low rather then the default active-high.
+
+IOW if bits 31-24 are 0 for a pin, then the default polarity of the pin
+is inverted.
+
+Add a check for this and also propagate this new polarity to the clock
+registration.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Patchset: cameras
+---
+ .../platform/x86/intel/int3472/clk_and_regulator.c | 5 ++++-
+ drivers/platform/x86/intel/int3472/common.h | 2 +-
+ drivers/platform/x86/intel/int3472/discrete.c | 13 +++++++++++--
+ 3 files changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+index 626e5e86f4e0c..1086c3d834945 100644
+--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
++++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+@@ -87,7 +87,7 @@ static const struct clk_ops skl_int3472_clock_ops = {
+ };
+
+ int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
+- struct acpi_resource_gpio *agpio)
++ struct acpi_resource_gpio *agpio, u32 polarity)
+ {
+ char *path = agpio->resource_source.string_ptr;
+ struct clk_init_data init = {
+@@ -105,6 +105,9 @@ int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
+ return dev_err_probe(int3472->dev, PTR_ERR(int3472->clock.ena_gpio),
+ "getting clk-enable GPIO\n");
+
++ if (polarity == GPIO_ACTIVE_LOW)
++ gpiod_toggle_active_low(int3472->clock.ena_gpio);
++
+ /* Ensure the pin is in output mode and non-active state */
+ gpiod_direction_output(int3472->clock.ena_gpio, 0);
+
+diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
+index 0d4fa7d00b5f6..61688e450ce58 100644
+--- a/drivers/platform/x86/intel/int3472/common.h
++++ b/drivers/platform/x86/intel/int3472/common.h
+@@ -122,7 +122,7 @@ int skl_int3472_get_sensor_adev_and_name(struct device *dev,
+ const char **name_ret);
+
+ int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
+- struct acpi_resource_gpio *agpio);
++ struct acpi_resource_gpio *agpio, u32 polarity);
+ void skl_int3472_unregister_clock(struct int3472_discrete_device *int3472);
+
+ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
+diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
+index 7bac0dd850c83..d402289ddaab8 100644
+--- a/drivers/platform/x86/intel/int3472/discrete.c
++++ b/drivers/platform/x86/intel/int3472/discrete.c
+@@ -234,11 +234,11 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+ struct int3472_discrete_device *int3472 = data;
+ struct acpi_resource_gpio *agpio;
+ union acpi_object *obj;
++ u8 active_value, type;
+ const char *err_msg;
+ const char *func;
+ u32 polarity;
+ int ret;
+- u8 type;
+
+ if (!acpi_gpio_get_io_resource(ares, &agpio))
+ return 1;
+@@ -262,6 +262,15 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+
+ int3472_get_func_and_polarity(type, &func, &polarity);
+
++ /* If bits 31-24 of the _DSM entry are all 0 then the signal is inverted */
++ active_value = obj->integer.value >> 24;
++ if (!active_value)
++ polarity ^= GPIO_ACTIVE_LOW;
++
++ dev_dbg(int3472->dev, "%s %s pin %d active-%s\n", func,
++ agpio->resource_source.string_ptr, agpio->pin_table[0],
++ (polarity == GPIO_ACTIVE_HIGH) ? "high" : "low");
++
+ switch (type) {
+ case INT3472_GPIO_TYPE_RESET:
+ case INT3472_GPIO_TYPE_POWERDOWN:
+@@ -271,7 +280,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
+
+ break;
+ case INT3472_GPIO_TYPE_CLK_ENABLE:
+- ret = skl_int3472_register_clock(int3472, agpio);
++ ret = skl_int3472_register_clock(int3472, agpio, polarity);
+ if (ret)
+ err_msg = "Failed to register clock\n";
+
+--
+2.39.2
+
+From 05715123be7926dc7215b061d4924149de00e5c2 Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa@redhat.com>
+Date: Tue, 21 Mar 2023 23:37:16 +0800
+Subject: [PATCH] platform: x86: int3472: Add MFD cell for tps68470 LED
+
+Add MFD cell for tps68470-led.
+
+Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
+Signed-off-by: Kate Hsuan <hpa@redhat.com>
+Patchset: cameras
+---
+ drivers/platform/x86/intel/int3472/tps68470.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
+index 6a0ff035cf209..2a7d01d3abc85 100644
+--- a/drivers/platform/x86/intel/int3472/tps68470.c
++++ b/drivers/platform/x86/intel/int3472/tps68470.c
+@@ -17,7 +17,7 @@
+ #define DESIGNED_FOR_CHROMEOS 1
+ #define DESIGNED_FOR_WINDOWS 2
+
+-#define TPS68470_WIN_MFD_CELL_COUNT 3
++#define TPS68470_WIN_MFD_CELL_COUNT 4
+
+ static const struct mfd_cell tps68470_cros[] = {
+ { .name = "tps68470-gpio" },
+@@ -200,7 +200,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
+ cells[1].name = "tps68470-regulator";
+ cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
+ cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
+- cells[2].name = "tps68470-gpio";
++ cells[2].name = "tps68470-led";
++ cells[3].name = "tps68470-gpio";
+
+ for (i = 0; i < board_data->n_gpiod_lookups; i++)
+ gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
+--
+2.39.2
+
+From e3eae9b725c30c0ce57a862c6ed258bb169db015 Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa@redhat.com>
+Date: Tue, 21 Mar 2023 23:37:17 +0800
+Subject: [PATCH] include: mfd: tps68470: Add masks for LEDA and LEDB
+
+Add flags for both LEDA(TPS68470_ILEDCTL_ENA), LEDB
+(TPS68470_ILEDCTL_ENB), and current control mask for LEDB
+(TPS68470_ILEDCTL_CTRLB)
+
+Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Kate Hsuan <hpa@redhat.com>
+Patchset: cameras
+---
+ include/linux/mfd/tps68470.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/linux/mfd/tps68470.h b/include/linux/mfd/tps68470.h
+index 7807fa329db00..2d2abb25b944f 100644
+--- a/include/linux/mfd/tps68470.h
++++ b/include/linux/mfd/tps68470.h
+@@ -34,6 +34,7 @@
+ #define TPS68470_REG_SGPO 0x22
+ #define TPS68470_REG_GPDI 0x26
+ #define TPS68470_REG_GPDO 0x27
++#define TPS68470_REG_ILEDCTL 0x28
+ #define TPS68470_REG_VCMVAL 0x3C
+ #define TPS68470_REG_VAUX1VAL 0x3D
+ #define TPS68470_REG_VAUX2VAL 0x3E
+@@ -94,4 +95,8 @@
+ #define TPS68470_GPIO_MODE_OUT_CMOS 2
+ #define TPS68470_GPIO_MODE_OUT_ODRAIN 3
+
++#define TPS68470_ILEDCTL_ENA BIT(2)
++#define TPS68470_ILEDCTL_ENB BIT(6)
++#define TPS68470_ILEDCTL_CTRLB GENMASK(5, 4)
++
+ #endif /* __LINUX_MFD_TPS68470_H */
+--
+2.39.2
+
+From 7d750ce7a2c5b5b92a2f2e0870f422a0e4b369c0 Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa@redhat.com>
+Date: Tue, 21 Mar 2023 23:37:18 +0800
+Subject: [PATCH] leds: tps68470: Add LED control for tps68470
+
+There are two LED controllers, LEDA indicator LED and LEDB flash LED for
+tps68470. LEDA can be enabled by setting TPS68470_ILEDCTL_ENA. Moreover,
+tps68470 provides four levels of power status for LEDB. If the
+properties called "ti,ledb-current" can be found, the current will be
+set according to the property values. These two LEDs can be controlled
+through the LED class of sysfs (tps68470-leda and tps68470-ledb).
+
+Signed-off-by: Kate Hsuan <hpa@redhat.com>
+Patchset: cameras
+---
+ drivers/leds/Kconfig | 12 +++
+ drivers/leds/Makefile | 1 +
+ drivers/leds/leds-tps68470.c | 185 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 198 insertions(+)
+ create mode 100644 drivers/leds/leds-tps68470.c
+
+diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
+index 499d0f215a8bf..f0caddb6ab757 100644
+--- a/drivers/leds/Kconfig
++++ b/drivers/leds/Kconfig
+@@ -846,6 +846,18 @@ config LEDS_TPS6105X
+ It is a single boost converter primarily for white LEDs and
+ audio amplifiers.
+
++config LEDS_TPS68470
++ tristate "LED support for TI TPS68470"
++ depends on LEDS_CLASS
++ depends on INTEL_SKL_INT3472
++ help
++ This driver supports TPS68470 PMIC with LED chip.
++ It provides two LED controllers, with the ability to drive 2
++ indicator LEDs and 2 flash LEDs.
++
++ To compile this driver as a module, choose M and it will be
++ called leds-tps68470
++
+ config LEDS_IP30
+ tristate "LED support for SGI Octane machines"
+ depends on LEDS_CLASS
+diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
+index 4fd2f92cd1981..b381220400398 100644
+--- a/drivers/leds/Makefile
++++ b/drivers/leds/Makefile
+@@ -82,6 +82,7 @@ obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
+ obj-$(CONFIG_LEDS_TI_LMU_COMMON) += leds-ti-lmu-common.o
+ obj-$(CONFIG_LEDS_TLC591XX) += leds-tlc591xx.o
+ obj-$(CONFIG_LEDS_TPS6105X) += leds-tps6105x.o
++obj-$(CONFIG_LEDS_TPS68470) += leds-tps68470.o
+ obj-$(CONFIG_LEDS_TURRIS_OMNIA) += leds-turris-omnia.o
+ obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o
+ obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
+diff --git a/drivers/leds/leds-tps68470.c b/drivers/leds/leds-tps68470.c
+new file mode 100644
+index 0000000000000..35aeb5db89c8f
+--- /dev/null
++++ b/drivers/leds/leds-tps68470.c
+@@ -0,0 +1,185 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * LED driver for TPS68470 PMIC
++ *
++ * Copyright (C) 2023 Red Hat
++ *
++ * Authors:
++ * Kate Hsuan <hpa@redhat.com>
++ */
++
++#include <linux/leds.h>
++#include <linux/mfd/tps68470.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/property.h>
++#include <linux/regmap.h>
++
++
++#define lcdev_to_led(led_cdev) \
++ container_of(led_cdev, struct tps68470_led, lcdev)
++
++#define led_to_tps68470(led, index) \
++ container_of(led, struct tps68470_device, leds[index])
++
++enum tps68470_led_ids {
++ TPS68470_ILED_A,
++ TPS68470_ILED_B,
++ TPS68470_NUM_LEDS
++};
++
++static const char *tps68470_led_names[] = {
++ [TPS68470_ILED_A] = "tps68470-iled_a",
++ [TPS68470_ILED_B] = "tps68470-iled_b",
++};
++
++struct tps68470_led {
++ unsigned int led_id;
++ struct led_classdev lcdev;
++};
++
++struct tps68470_device {
++ struct device *dev;
++ struct regmap *regmap;
++ struct tps68470_led leds[TPS68470_NUM_LEDS];
++};
++
++enum ctrlb_current {
++ CTRLB_2MA = 0,
++ CTRLB_4MA = 1,
++ CTRLB_8MA = 2,
++ CTRLB_16MA = 3,
++};
++
++static int tps68470_brightness_set(struct led_classdev *led_cdev, enum led_brightness brightness)
++{
++ struct tps68470_led *led = lcdev_to_led(led_cdev);
++ struct tps68470_device *tps68470 = led_to_tps68470(led, led->led_id);
++ struct regmap *regmap = tps68470->regmap;
++
++ switch (led->led_id) {
++ case TPS68470_ILED_A:
++ return regmap_update_bits(regmap, TPS68470_REG_ILEDCTL, TPS68470_ILEDCTL_ENA,
++ brightness ? TPS68470_ILEDCTL_ENA : 0);
++ case TPS68470_ILED_B:
++ return regmap_update_bits(regmap, TPS68470_REG_ILEDCTL, TPS68470_ILEDCTL_ENB,
++ brightness ? TPS68470_ILEDCTL_ENB : 0);
++ }
++ return -EINVAL;
++}
++
++static enum led_brightness tps68470_brightness_get(struct led_classdev *led_cdev)
++{
++ struct tps68470_led *led = lcdev_to_led(led_cdev);
++ struct tps68470_device *tps68470 = led_to_tps68470(led, led->led_id);
++ struct regmap *regmap = tps68470->regmap;
++ int ret = 0;
++ int value = 0;
++
++ ret = regmap_read(regmap, TPS68470_REG_ILEDCTL, &value);
++ if (ret)
++ return dev_err_probe(led_cdev->dev, -EINVAL, "failed on reading register\n");
++
++ switch (led->led_id) {
++ case TPS68470_ILED_A:
++ value = value & TPS68470_ILEDCTL_ENA;
++ break;
++ case TPS68470_ILED_B:
++ value = value & TPS68470_ILEDCTL_ENB;
++ break;
++ }
++
++ return value ? LED_ON : LED_OFF;
++}
++
++
++static int tps68470_ledb_current_init(struct platform_device *pdev,
++ struct tps68470_device *tps68470)
++{
++ int ret = 0;
++ unsigned int curr;
++
++ /* configure LEDB current if the properties can be got */
++ if (!device_property_read_u32(&pdev->dev, "ti,ledb-current", &curr)) {
++ if (curr > CTRLB_16MA) {
++ dev_err(&pdev->dev,
++ "Invalid LEDB current value: %d\n",
++ curr);
++ return -EINVAL;
++ }
++ ret = regmap_update_bits(tps68470->regmap, TPS68470_REG_ILEDCTL,
++ TPS68470_ILEDCTL_CTRLB, curr);
++ }
++ return ret;
++}
++
++static int tps68470_leds_probe(struct platform_device *pdev)
++{
++ int i = 0;
++ int ret = 0;
++ struct tps68470_device *tps68470;
++ struct tps68470_led *led;
++ struct led_classdev *lcdev;
++
++ tps68470 = devm_kzalloc(&pdev->dev, sizeof(struct tps68470_device),
++ GFP_KERNEL);
++ if (!tps68470)
++ return -ENOMEM;
++
++ tps68470->dev = &pdev->dev;
++ tps68470->regmap = dev_get_drvdata(pdev->dev.parent);
++
++ for (i = 0; i < TPS68470_NUM_LEDS; i++) {
++ led = &tps68470->leds[i];
++ lcdev = &led->lcdev;
++
++ led->led_id = i;
++
++ lcdev->name = devm_kasprintf(tps68470->dev, GFP_KERNEL, "%s::%s",
++ tps68470_led_names[i], LED_FUNCTION_INDICATOR);
++ if (!lcdev->name)
++ return -ENOMEM;
++
++ lcdev->max_brightness = 1;
++ lcdev->brightness = 0;
++ lcdev->brightness_set_blocking = tps68470_brightness_set;
++ lcdev->brightness_get = tps68470_brightness_get;
++ lcdev->dev = &pdev->dev;
++
++ ret = devm_led_classdev_register(tps68470->dev, lcdev);
++ if (ret) {
++ dev_err_probe(tps68470->dev, ret,
++ "error registering led\n");
++ goto err_exit;
++ }
++
++ if (i == TPS68470_ILED_B) {
++ ret = tps68470_ledb_current_init(pdev, tps68470);
++ if (ret)
++ goto err_exit;
++ }
++ }
++
++err_exit:
++ if (ret) {
++ for (i = 0; i < TPS68470_NUM_LEDS; i++) {
++ if (tps68470->leds[i].lcdev.name)
++ devm_led_classdev_unregister(&pdev->dev,
++ &tps68470->leds[i].lcdev);
++ }
++ }
++
++ return ret;
++}
++static struct platform_driver tps68470_led_driver = {
++ .driver = {
++ .name = "tps68470-led",
++ },
++ .probe = tps68470_leds_probe,
++};
++
++module_platform_driver(tps68470_led_driver);
++
++MODULE_ALIAS("platform:tps68470-led");
++MODULE_DESCRIPTION("LED driver for TPS68470 PMIC");
++MODULE_LICENSE("GPL v2");
+--
+2.39.2
+
+From 934e19bcd91c33cf11a8c592924c5972dd95c54d Mon Sep 17 00:00:00 2001
+From: Daniel Scally <dan.scally@ideasonboard.com>
+Date: Wed, 22 Mar 2023 11:01:42 +0000
+Subject: [PATCH] media: v4l2-core: Acquire privacy led in
+ v4l2_async_register_subdev()
+
+The current call to v4l2_subdev_get_privacy_led() is contained in
+v4l2_async_register_subdev_sensor(), but that function isn't used by
+all the sensor drivers. Move the acquisition of the privacy led to
+v4l2_async_register_subdev() instead.
+
+Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
+Patchset: cameras
+---
+ drivers/media/v4l2-core/v4l2-async.c | 4 ++++
+ drivers/media/v4l2-core/v4l2-fwnode.c | 4 ----
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
+index b26dcb8d423e1..43774d5acf5d1 100644
+--- a/drivers/media/v4l2-core/v4l2-async.c
++++ b/drivers/media/v4l2-core/v4l2-async.c
+@@ -757,6 +757,10 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
+ struct v4l2_async_notifier *notifier;
+ int ret;
+
++ ret = v4l2_subdev_get_privacy_led(sd);
++ if (ret < 0)
++ return ret;
++
+ /*
+ * No reference taken. The reference is held by the device
+ * (struct v4l2_subdev.dev), and async sub-device does not
+diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
+index 8501b6931d3a0..077d85553b2b9 100644
+--- a/drivers/media/v4l2-core/v4l2-fwnode.c
++++ b/drivers/media/v4l2-core/v4l2-fwnode.c
+@@ -1303,10 +1303,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
+
+ v4l2_async_nf_init(notifier);
+
+- ret = v4l2_subdev_get_privacy_led(sd);
+- if (ret < 0)
+- goto out_cleanup;
+-
+ ret = v4l2_async_nf_parse_fwnode_sensor(sd->dev, notifier);
+ if (ret < 0)
+ goto out_cleanup;
+--
+2.39.2
+
+From 0d862175e6d09c9d5aeeaec117e973700b84f6f2 Mon Sep 17 00:00:00 2001
+From: Daniel Scally <dan.scally@ideasonboard.com>
+Date: Tue, 21 Mar 2023 13:45:26 +0000
+Subject: [PATCH] media: i2c: Clarify that gain is Analogue gain in OV7251
+
+Update the control ID for the gain control in the ov7251 driver to
+V4L2_CID_ANALOGUE_GAIN.
+
+Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
+Patchset: cameras
+---
+ drivers/media/i2c/ov7251.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
+index 88e9874352853..ff7b2c26da835 100644
+--- a/drivers/media/i2c/ov7251.c
++++ b/drivers/media/i2c/ov7251.c
+@@ -1051,7 +1051,7 @@ static int ov7251_s_ctrl(struct v4l2_ctrl *ctrl)
+ case V4L2_CID_EXPOSURE:
+ ret = ov7251_set_exposure(ov7251, ctrl->val);
+ break;
+- case V4L2_CID_GAIN:
++ case V4L2_CID_ANALOGUE_GAIN:
+ ret = ov7251_set_gain(ov7251, ctrl->val);
+ break;
+ case V4L2_CID_TEST_PATTERN:
+@@ -1551,7 +1551,7 @@ static int ov7251_init_ctrls(struct ov7251 *ov7251)
+ ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
+ V4L2_CID_EXPOSURE, 1, 32, 1, 32);
+ ov7251->gain = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
+- V4L2_CID_GAIN, 16, 1023, 1, 16);
++ V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
+ v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
+ V4L2_CID_TEST_PATTERN,
+ ARRAY_SIZE(ov7251_test_pattern_menu) - 1,
+--
+2.39.2
+
+From cd7cd2e85e50076ec726e7498bba71b8707d331a Mon Sep 17 00:00:00 2001
From: Sachi King <nakato@nakato.io>
Date: Sat, 29 May 2021 17:47:38 +1000
Subject: [PATCH] ACPI: Add quirk for Surface Laptop 4 AMD missing irq 7
@@ -9391,7 +11322,7 @@ index 518bda50068cb..7706380d825a3 100644
--
2.39.2
-From a0fb4db2608c4b4fb1cab7b4423977066cb562a2 Mon Sep 17 00:00:00 2001
+From 089fb5eba602462565f7290a5b9c681aad8ade2b Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Thu, 3 Jun 2021 14:04:26 +0200
Subject: [PATCH] ACPI: Add AMD 13" Surface Laptop 4 model to irq 7 override
@@ -9433,7 +11364,7 @@ index 7706380d825a3..e26c38ddc601d 100644
--
2.39.2
-From 746c31d2656d6d6cdcc60720c2fd4786ad0b10d0 Mon Sep 17 00:00:00 2001
+From c1425862cef6f3bafef2e6ad644e8146f72096bf Mon Sep 17 00:00:00 2001
From: "Bart Groeneveld | GPX Solutions B.V" <bart@gpxbv.nl>
Date: Mon, 5 Dec 2022 16:08:46 +0100
Subject: [PATCH] acpi: allow usage of acpi_tad on HW-reduced platforms
@@ -9542,7 +11473,7 @@ index e9b8e8305e23e..944276934e7ec 100644
--
2.39.2
-From ef683c897ea03ef7d216d86fb26f071d2a07714f Mon Sep 17 00:00:00 2001
+From 0289e120424c88695e731293bb4f2816bc1d8da6 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:29 -0800
Subject: [PATCH] sched/fair: Generalize asym_packing logic for SMT cores
@@ -9651,7 +11582,7 @@ index 0f87369914274..4509086a60a0d 100644
--
2.39.2
-From b75545598a8a18fab36774ec716ec00c58a026ce Mon Sep 17 00:00:00 2001
+From e9da5836d3052648536258be7fbaec9f2f15862e Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:30 -0800
Subject: [PATCH] sched/fair: Move is_core_idle() out of CONFIG_NUMA
@@ -9733,7 +11664,7 @@ index 4509086a60a0d..d58df9c6a88c4 100644
--
2.39.2
-From aca0743d3829f7f7ae7d9cfb0d6d0e61a73aa44e Mon Sep 17 00:00:00 2001
+From e0ad77720e1ed2dc413aa9229442e8df0ee0f6ac Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:31 -0800
Subject: [PATCH] sched/fair: Only do asym_packing load balancing from fully
@@ -9848,7 +11779,7 @@ index d58df9c6a88c4..1b134a2f0585b 100644
--
2.39.2
-From 77c8dd879efa32c3fab952e706c965687024e6cd Mon Sep 17 00:00:00 2001
+From 6894e2e70bb2dfe0a96d65a70c1e9a4005528211 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:32 -0800
Subject: [PATCH] sched/fair: Let low-priority cores help high-priority busy
@@ -9942,7 +11873,7 @@ index 1b134a2f0585b..1255d99877fea 100644
--
2.39.2
-From 323d8042cee12e6147ef7ea3738b69d0e6a7e9ad Mon Sep 17 00:00:00 2001
+From aacb4416f1e6e04c9ef67e06855b7a4c26d33e3d Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:33 -0800
Subject: [PATCH] sched/fair: Keep a fully_busy SMT sched group as busiest
@@ -10002,7 +11933,7 @@ index 1255d99877fea..ed1f13fa32f86 100644
--
2.39.2
-From dde9084c57d02f5a1da934859442ee525a260e04 Mon Sep 17 00:00:00 2001
+From 6a40621091eafca8bc7d4ac2f178971046744a58 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:34 -0800
Subject: [PATCH] sched/fair: Use the prefer_sibling flag of the current sched
@@ -10085,7 +12016,7 @@ index ed1f13fa32f86..9d94ba3f67269 100644
--
2.39.2
-From 48412864de41a267b8d2bc8eef842c8d08a758d7 Mon Sep 17 00:00:00 2001
+From b35c1dc0c7b494d014ffbc6e310506fb8c1b3457 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:35 -0800
Subject: [PATCH] sched/fair: Do not even the number of busy CPUs via
@@ -10185,7 +12116,7 @@ index 9d94ba3f67269..e5079ee882ff8 100644
--
2.39.2
-From de653cfbb41effe00b5cd39e9ab1cdf8161b0dd1 Mon Sep 17 00:00:00 2001
+From a06f6c7fbf4e42b2e8ff963d7b3d963550cc8ea3 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:36 -0800
Subject: [PATCH] sched/topology: Remove SHARED_CHILD from ASYM_PACKING
@@ -10247,7 +12178,7 @@ index 57bde66d95f7a..800238854ba54 100644
--
2.39.2
-From f912f5ff5fa355bb10c925da333820bad702eee3 Mon Sep 17 00:00:00 2001
+From ae1ee00a1f2e7ea4ff86ad6f9fbce736960049f3 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:37 -0800
Subject: [PATCH] x86/sched: Remove SD_ASYM_PACKING from the SMT domain flags
@@ -10290,7 +12221,7 @@ index 55cad72715d99..0213d066a9a96 100644
--
2.39.2
-From e55b1f770f6f7a8f0590934fedf1056a3cd38bf8 Mon Sep 17 00:00:00 2001
+From 03868cd4806db1cfd95e78ddaa203000b8aad97f Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 20:58:38 -0800
Subject: [PATCH] x86/sched/itmt: Give all SMT siblings of a core the same
@@ -10365,7 +12296,7 @@ index 9ff480e94511b..6510883c5e817 100644
--
2.39.2
-From 74e8f42a15eec4075c11e87cfff6b7a92ed7ff74 Mon Sep 17 00:00:00 2001
+From 10a86fa64a25c1156d1de468366708274cdbf6b8 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:42 -0800
Subject: [PATCH] sched/task_struct: Introduce IPC classes of tasks
@@ -10466,7 +12397,7 @@ index 44e90b28a30f1..24c5eec9d22e6 100644
--
2.39.2
-From 5ae55b454240fa74b4d374ab0c5a31f55282c993 Mon Sep 17 00:00:00 2001
+From 11597284e5e583ef060ff6ccc4a3aa619c672d26 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:43 -0800
Subject: [PATCH] sched: Add interfaces for IPC classes
@@ -10626,7 +12557,7 @@ index 8739c2a5a54ea..60e03d15f58ca 100644
--
2.39.2
-From 05744accedaec52bfd4aedcf631767325fbde838 Mon Sep 17 00:00:00 2001
+From db0b0e36404f9b091b52d5c1798ca3e875bf3728 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:44 -0800
Subject: [PATCH] sched/core: Initialize the IPC class of a new task
@@ -10673,7 +12604,7 @@ index 2a4918a1faa9e..325b1d3cf7a82 100644
--
2.39.2
-From 016f5b2cd54c071f81d86a1f042ae6ad595886c9 Mon Sep 17 00:00:00 2001
+From 8250fc7b2d160a0638603d7575b0516a0ff1340e Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:45 -0800
Subject: [PATCH] sched/core: Add user_tick as argument to scheduler_tick()
@@ -10747,7 +12678,7 @@ index 63a8ce7177dd4..e15e24105891f 100644
--
2.39.2
-From d3d117eeb16a411ea67f7a1c9bf4acfa1ed9b256 Mon Sep 17 00:00:00 2001
+From 7151037d127499dfdb328d84ffc2f435aa3471ce Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:46 -0800
Subject: [PATCH] sched/core: Update the IPC class of the current task
@@ -10795,7 +12726,7 @@ index b438fc79f868f..0ab39cc055c77 100644
--
2.39.2
-From 8333c02eaf5e0babe692c205427923404106ca75 Mon Sep 17 00:00:00 2001
+From 7bd90996a0cfd74c641d808c8975ab8aa5796572 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:47 -0800
Subject: [PATCH] sched/fair: Collect load-balancing stats for IPC classes
@@ -10931,7 +12862,7 @@ index e5079ee882ff8..a418164953c36 100644
--
2.39.2
-From 27df75aad30f6048710b66a2d29596456a3fab1e Mon Sep 17 00:00:00 2001
+From dcdc8c47500008e304dab90c7546127c8a056752 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:48 -0800
Subject: [PATCH] sched/fair: Compute IPC class scores for load balancing
@@ -11077,7 +13008,7 @@ index a418164953c36..ae0c908be707e 100644
--
2.39.2
-From afccecd0a2e3324fea9ac222a33c64836d36f999 Mon Sep 17 00:00:00 2001
+From f5899b589a3df28df698309c8529262012cbfcbc Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:49 -0800
Subject: [PATCH] sched/fair: Use IPCC stats to break ties between asym_packing
@@ -11215,7 +13146,7 @@ index ae0c908be707e..cffb435e2b1c4 100644
--
2.39.2
-From 732fff8467251681e45139a0867b043097c9c4dc Mon Sep 17 00:00:00 2001
+From 516bec260bf73b1f5c078755b96593849fd166d3 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:50 -0800
Subject: [PATCH] sched/fair: Use IPCC stats to break ties between fully_busy
@@ -11300,7 +13231,7 @@ index cffb435e2b1c4..0996339df429b 100644
--
2.39.2
-From 99d12fb18c6cef675f946830695624f206d9d71c Mon Sep 17 00:00:00 2001
+From 442df79e3613c6db2f01a8489177d0edd366309d Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:51 -0800
Subject: [PATCH] sched/fair: Use IPCC scores to select a busiest runqueue
@@ -11435,7 +13366,7 @@ index 0996339df429b..a9a105092e7c3 100644
--
2.39.2
-From c93a9848fb88c04729013184fa70b1f50b647e25 Mon Sep 17 00:00:00 2001
+From fa944aa2c7b296272c55a201a3aa40a84f9737a5 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:52 -0800
Subject: [PATCH] thermal: intel: hfi: Introduce Intel Thread Director classes
@@ -11561,7 +13492,7 @@ index 6e604bda2b939..2527ae3836c74 100644
--
2.39.2
-From 4d3b422e29ecb101d6a312ca0657b706a5bfa118 Mon Sep 17 00:00:00 2001
+From 61b13cb56dcd43bfa7ef1a94ae93fb4f9d45b7dc Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:53 -0800
Subject: [PATCH] x86/cpufeatures: Add the Intel Thread Director feature
@@ -11652,7 +13583,7 @@ index d952211171292..277f157e067e5 100644
--
2.39.2
-From a3f66f0bb60f83ed41672eabbf9276a4294b1307 Mon Sep 17 00:00:00 2001
+From b32f2ed414ebd4bef042aa2529acdefbad0352a2 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:54 -0800
Subject: [PATCH] thermal: intel: hfi: Store per-CPU IPCC scores
@@ -11771,7 +13702,7 @@ index 2527ae3836c74..b06021828892c 100644
--
2.39.2
-From 3604b9c5dc020ad06dc7d3d21214de94e07ca84e Mon Sep 17 00:00:00 2001
+From 9b519ff89b08af84eb947598643a71fddcc6a263 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:55 -0800
Subject: [PATCH] thermal: intel: hfi: Update the IPC class of the current task
@@ -11870,7 +13801,7 @@ index b06021828892c..530dcf57e06e2 100644
--
2.39.2
-From 5c3bfe4cd71dc05f246398d05f4c3365f83c7c36 Mon Sep 17 00:00:00 2001
+From 4cd93c9b598e57aa752639a4d93240d54ca89f23 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:56 -0800
Subject: [PATCH] thermal: intel: hfi: Report the IPC class score of a CPU
@@ -11958,7 +13889,7 @@ index 530dcf57e06e2..fa9b4a678d926 100644
--
2.39.2
-From c8b9245402dd376b2f62cbed9285fadd10e29fd8 Mon Sep 17 00:00:00 2001
+From 6452cc53bb25d5f4716f2e59ae3900452315b9be Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:57 -0800
Subject: [PATCH] thermal: intel: hfi: Define a default class for unclassified
@@ -12033,7 +13964,7 @@ index fa9b4a678d926..7ea6acce7107e 100644
--
2.39.2
-From 7fd5332b8c7b5d18e554d75c01e1d67032c43fd6 Mon Sep 17 00:00:00 2001
+From 44126224fe2556862b2324fbff03fd627e195080 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:58 -0800
Subject: [PATCH] thermal: intel: hfi: Enable the Intel Thread Director
@@ -12166,7 +14097,7 @@ index 7ea6acce7107e..35d947f475508 100644
--
2.39.2
-From 7657dffbcb8e9b0c2d4e0d633b3ef673a3f01433 Mon Sep 17 00:00:00 2001
+From 734cc5407daf6d98ff6c89f79bf1f794635f7617 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:10:59 -0800
Subject: [PATCH] sched/task_struct: Add helpers for IPC classification
@@ -12228,7 +14159,7 @@ index 4f96c3dd59d0b..582e14cf3f765 100644
--
2.39.2
-From b95587d6ea24f504c5f67ee8401348b884c2d97c Mon Sep 17 00:00:00 2001
+From 41d3fb0009d226f33935191790774bec3460c3e1 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:00 -0800
Subject: [PATCH] sched/core: Initialize helpers of task classification
@@ -12274,7 +14205,7 @@ index 0ab39cc055c77..2a942fc3c3094 100644
--
2.39.2
-From f099e584af6ef7431cb1133eb1e1d98c070072f4 Mon Sep 17 00:00:00 2001
+From 4e8dc94941042de9905f32f1d8e1a49e8893d631 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:01 -0800
Subject: [PATCH] sched/fair: Introduce sched_smt_siblings_idle()
@@ -12386,7 +14317,7 @@ index a9a105092e7c3..97c574d5fa575 100644
--
2.39.2
-From 7a1b535c79155e8c633551d6a8da3140c820a174 Mon Sep 17 00:00:00 2001
+From 0552b24fd1c1d40cd5b4a32d07afae3f3136d6c2 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:02 -0800
Subject: [PATCH] thermal: intel: hfi: Implement model-specific checks for task
@@ -12512,7 +14443,7 @@ index 35d947f475508..fdb53e4cabc14 100644
--
2.39.2
-From ed906fc833a3cbc0f433a3dc263b6acc310ec389 Mon Sep 17 00:00:00 2001
+From ea77b647f82ae1b9b57f60841b2aad7cb89bbc92 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:03 -0800
Subject: [PATCH] x86/cpufeatures: Add feature bit for HRESET
@@ -12592,7 +14523,7 @@ index f53944fb8f7f9..66bc5713644dc 100644
--
2.39.2
-From e96f26f58238c501c9737f380c85bc324cbe5e5d Mon Sep 17 00:00:00 2001
+From 98f46411379b4192bc6070a38628c32e880854a8 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:04 -0800
Subject: [PATCH] x86/hreset: Configure history reset
@@ -12669,7 +14600,7 @@ index 6a25e93f2a87c..ae250426af286 100644
--
2.39.2
-From e617f5eebd9405d27abf82a364ae40e1e9fde68c Mon Sep 17 00:00:00 2001
+From 296067cf1027b437407e587a6cb2a0a7bdf6c503 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Mon, 6 Feb 2023 21:11:05 -0800
Subject: [PATCH] x86/process: Reset hardware history in context switch