--- /dev/null
+From e1c6db864599be341cd3bcc041540383215ce05e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= <michal.kopec@3mdeb.com>
+Date: Mon, 1 Jul 2024 13:10:09 +0200
+Subject: ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Michał Kopeć <michal.kopec@3mdeb.com>
+
+commit e1c6db864599be341cd3bcc041540383215ce05e upstream.
+
+Apply quirk to fix combo jack detection on a new Clevo model: V5[46]0TU
+
+Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240701111010.1496569-1-michal.kopec@3mdeb.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -10424,6 +10424,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
++ SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
--- /dev/null
+From b46953029c52bd3a3306ff79f631418b75384656 Mon Sep 17 00:00:00 2001
+From: Nazar Bilinskyi <nbilinskyi@gmail.com>
+Date: Tue, 9 Jul 2024 11:05:46 +0300
+Subject: ALSA: hda/realtek: Enable Mute LED on HP 250 G7
+
+From: Nazar Bilinskyi <nbilinskyi@gmail.com>
+
+commit b46953029c52bd3a3306ff79f631418b75384656 upstream.
+
+HP 250 G7 has a mute LED that can be made to work using quirk
+ALC269_FIXUP_HP_LINE1_MIC1_LED. Enable already existing quirk.
+
+Signed-off-by: Nazar Bilinskyi <nbilinskyi@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240709080546.18344-1-nbilinskyi@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9999,6 +9999,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+ SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+ SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
++ SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED),
+ SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
+ SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
+ SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
--- /dev/null
+From 6db03b1929e207d2c6e84e75a9cd78124b3d6c6d Mon Sep 17 00:00:00 2001
+From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+Date: Fri, 5 Jul 2024 11:10:12 -0300
+Subject: ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
+
+From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+
+commit 6db03b1929e207d2c6e84e75a9cd78124b3d6c6d upstream.
+
+The internal mic boost on the VAIO models VJFE-CL and VJFE-IL is too high.
+Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine
+to limit the gain.
+
+Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240705141012.5368-1-edson.drosdeck@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -10328,6 +10328,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
+ SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
+ SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
++ SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+ SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+ SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+ SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+@@ -10596,6 +10597,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
++ SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+ SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
+ SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
+ SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
--- /dev/null
+From 41fca5930afb36453cc90d4002841edd9990d0ad Mon Sep 17 00:00:00 2001
+From: Cong Zhang <quic_congzhan@quicinc.com>
+Date: Tue, 4 Jun 2024 16:59:29 +0800
+Subject: arm64: dts: qcom: sa8775p: Correct IRQ number of EL2 non-secure physical timer
+
+From: Cong Zhang <quic_congzhan@quicinc.com>
+
+commit 41fca5930afb36453cc90d4002841edd9990d0ad upstream.
+
+The INTID of EL2 non-secure physical timer is 26. In linux, the IRQ
+number has a fixed 16 offset for PPIs. Therefore, the linux IRQ number
+of EL2 non-secure physical timer should be 10 (26 - 16).
+
+Fixes: 603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride")
+Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20240604085929.49227-1-quic_congzhan@quicinc.com
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
++++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+@@ -3605,7 +3605,7 @@
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+- <GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
++ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+
+ pcie0: pcie@1c00000 {
--- /dev/null
+From 7bfb6a4289b0a63d67ec7d4ce3018cb4a7442f6a Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan+linaro@kernel.org>
+Date: Tue, 7 May 2024 16:48:19 +0200
+Subject: arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
+
+From: Johan Hovold <johan+linaro@kernel.org>
+
+commit 7bfb6a4289b0a63d67ec7d4ce3018cb4a7442f6a upstream.
+
+The Elan eKTH5015M touch controller on the X13s requires a 300 ms delay
+before sending commands after having deasserted reset during power on.
+
+Switch to the Elan specific binding so that the OS can determine the
+required power-on sequence and make sure that the controller is always
+detected during boot.
+
+Note that the always-on 1.8 V supply (s10b) is not used by the
+controller directly and should not be described.
+
+Fixes: 32c231385ed4 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree")
+Cc: stable@vger.kernel.org # 6.0
+Tested-by: Steev Klimaszewski <steev@kali.org>
+Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
+Link: https://lore.kernel.org/r/20240507144821.12275-6-johan+linaro@kernel.org
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15 ++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
++++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+@@ -618,15 +618,16 @@
+
+ status = "okay";
+
+- /* FIXME: verify */
+ touchscreen@10 {
+- compatible = "hid-over-i2c";
++ compatible = "elan,ekth5015m", "elan,ekth6915";
+ reg = <0x10>;
+
+- hid-descr-addr = <0x1>;
+ interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
+- vdd-supply = <&vreg_misc_3p3>;
+- vddl-supply = <&vreg_s10b>;
++ reset-gpios = <&tlmm 99 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
++ no-reset-on-power-off;
++
++ vcc33-supply = <&vreg_misc_3p3>;
++ vccio-supply = <&vreg_misc_3p3>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&ts0_default>;
+@@ -1417,8 +1418,8 @@
+ reset-n-pins {
+ pins = "gpio99";
+ function = "gpio";
+- output-high;
+- drive-strength = <16>;
++ drive-strength = <2>;
++ bias-disable;
+ };
+ };
+
--- /dev/null
+From 74de2ecf1c418c96d2bffa7770953b8991425dd2 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Tue, 11 Jun 2024 16:25:55 +0200
+Subject: arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+commit 74de2ecf1c418c96d2bffa7770953b8991425dd2 upstream.
+
+The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
+headset recording (via the WCD9385 codec and the TX macro codec) we want
+to use the next DAI, not the first one (see qcom,dout-ports and
+qcom,din-ports for soundwire@6d30000 node).
+
+Original code was copied from other devices like SM8450 and SM8550. On
+the SM8450 this was a correct setting, however on the SM8550 this worked
+probably only by coincidence, because the DTS defined no output ports on
+SWR2 Soundwire.
+
+This is a necessary fix for proper audio recording via analogue
+microphones connected to WCD9385 codec (e.g. headset AMIC2).
+
+Fixes: 4442a67eedc1 ("arm64: dts: qcom: x1e80100-crd: add sound card")
+Cc: stable@vger.kernel.org
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Link: https://lore.kernel.org/r/20240611142555.994675-2-krzysztof.kozlowski@linaro.org
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
++++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+@@ -101,7 +101,7 @@
+ };
+
+ codec {
+- sound-dai = <&wcd938x 1>, <&swr2 0>, <&lpass_txmacro 0>;
++ sound-dai = <&wcd938x 1>, <&swr2 1>, <&lpass_txmacro 0>;
+ };
+
+ platform {
--- /dev/null
+From dfce1771680c70a437556bc81e3e1e22088b67de Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Tue, 11 Jun 2024 16:25:54 +0200
+Subject: arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+commit dfce1771680c70a437556bc81e3e1e22088b67de upstream.
+
+Starting with the LPASS v11 (SM8550 also X1E80100), there is an
+additional output port on SWR2 Soundwire instance, thus WCD9385 audio
+codec TX port mapping should be shifted by one. This is a necessary fix
+for proper audio recording via analogue microphones connected to WCD9385
+codec (e.g. headset AMIC2).
+
+Fixes: 229c9ce0fd11 ("arm64: dts: qcom: x1e80100-crd: add WCD9385 Audio Codec")
+Cc: stable@vger.kernel.org
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Link: https://lore.kernel.org/r/20240611142555.994675-1-krzysztof.kozlowski@linaro.org
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
++++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+@@ -736,7 +736,7 @@
+ wcd_tx: codec@0,3 {
+ compatible = "sdw20217010d00";
+ reg = <0 3>;
+- qcom,tx-port-mapping = <1 1 2 3>;
++ qcom,tx-port-mapping = <2 2 3 4>;
+ };
+ };
+
--- /dev/null
+From 74cb21576ea5247efbbb7d92f71cafee12159cd9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?=
+ <joao.goncalves@toradex.com>
+Date: Fri, 14 Jun 2024 11:36:58 -0300
+Subject: iio: trigger: Fix condition for own trigger
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: João Paulo Gonçalves <joao.goncalves@toradex.com>
+
+commit 74cb21576ea5247efbbb7d92f71cafee12159cd9 upstream.
+
+The condition for checking if triggers belong to the same IIO device to
+set attached_own_device is currently inverted, causing
+iio_trigger_using_own() to return an incorrect value. Fix it by testing
+for the correct return value of iio_validate_own_trigger().
+
+Cc: stable@vger.kernel.org
+Fixes: 517985ebc531 ("iio: trigger: Add simple trigger_validation helper")
+Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
+Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
+Link: https://lore.kernel.org/r/20240614143658.3531097-1-jpaulo.silvagoncalves@gmail.com
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/industrialio-trigger.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iio/industrialio-trigger.c
++++ b/drivers/iio/industrialio-trigger.c
+@@ -322,7 +322,7 @@ int iio_trigger_attach_poll_func(struct
+ * this is the case if the IIO device and the trigger device share the
+ * same parent device.
+ */
+- if (iio_validate_own_trigger(pf->indio_dev, trig))
++ if (!iio_validate_own_trigger(pf->indio_dev, trig))
+ trig->attached_own_device = true;
+
+ return ret;
--- /dev/null
+From 07de60a46ae9c0583df1c644bae6d3b22d1d903d Mon Sep 17 00:00:00 2001
+From: Wentong Wu <wentong.wu@intel.com>
+Date: Tue, 25 Jun 2024 16:10:43 +0800
+Subject: mei: vsc: Enhance IVSC chipset stability during warm reboot
+
+From: Wentong Wu <wentong.wu@intel.com>
+
+commit 07de60a46ae9c0583df1c644bae6d3b22d1d903d upstream.
+
+During system shutdown, incorporate reset logic to ensure the IVSC
+chipset remains in a valid state. This adjustment guarantees that
+the IVSC chipset operates in a known state following a warm reboot.
+
+Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
+Cc: stable@vger.kernel.org # for 6.8+
+Signed-off-by: Wentong Wu <wentong.wu@intel.com>
+Tested-by: Jason Chen <jason.z.chen@intel.com>
+Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Link: https://lore.kernel.org/r/20240625081047.4178494-2-wentong.wu@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/mei/vsc-tp.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
+index e6a98dba8a73..5f3195636e53 100644
+--- a/drivers/misc/mei/vsc-tp.c
++++ b/drivers/misc/mei/vsc-tp.c
+@@ -568,6 +568,19 @@ static void vsc_tp_remove(struct spi_device *spi)
+ free_irq(spi->irq, tp);
+ }
+
++static void vsc_tp_shutdown(struct spi_device *spi)
++{
++ struct vsc_tp *tp = spi_get_drvdata(spi);
++
++ platform_device_unregister(tp->pdev);
++
++ mutex_destroy(&tp->mutex);
++
++ vsc_tp_reset(tp);
++
++ free_irq(spi->irq, tp);
++}
++
+ static const struct acpi_device_id vsc_tp_acpi_ids[] = {
+ { "INTC1009" }, /* Raptor Lake */
+ { "INTC1058" }, /* Tiger Lake */
+@@ -580,6 +593,7 @@ MODULE_DEVICE_TABLE(acpi, vsc_tp_acpi_ids);
+ static struct spi_driver vsc_tp_driver = {
+ .probe = vsc_tp_probe,
+ .remove = vsc_tp_remove,
++ .shutdown = vsc_tp_shutdown,
+ .driver = {
+ .name = "vsc-tp",
+ .acpi_match_table = vsc_tp_acpi_ids,
+--
+2.45.2
+
--- /dev/null
+From a9e8fe38195ae6f8e5b32907a17b397ff3ce3e48 Mon Sep 17 00:00:00 2001
+From: Wentong Wu <wentong.wu@intel.com>
+Date: Tue, 25 Jun 2024 16:10:44 +0800
+Subject: mei: vsc: Prevent timeout error with added delay post-firmware download
+
+From: Wentong Wu <wentong.wu@intel.com>
+
+commit a9e8fe38195ae6f8e5b32907a17b397ff3ce3e48 upstream.
+
+After completing the firmware download, the firmware requires some
+time to become functional. This change introduces additional sleep
+time before the first read operation to prevent a confusing timeout
+error in vsc_tp_xfer().
+
+Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
+Cc: stable@vger.kernel.org # for 6.8+
+Signed-off-by: Wentong Wu <wentong.wu@intel.com>
+Tested-by: Jason Chen <jason.z.chen@intel.com>
+Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Link: https://lore.kernel.org/r/20240625081047.4178494-3-wentong.wu@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/mei/platform-vsc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/misc/mei/platform-vsc.c
++++ b/drivers/misc/mei/platform-vsc.c
+@@ -28,8 +28,8 @@
+
+ #define MEI_VSC_MAX_MSG_SIZE 512
+
+-#define MEI_VSC_POLL_DELAY_US (50 * USEC_PER_MSEC)
+-#define MEI_VSC_POLL_TIMEOUT_US (200 * USEC_PER_MSEC)
++#define MEI_VSC_POLL_DELAY_US (100 * USEC_PER_MSEC)
++#define MEI_VSC_POLL_TIMEOUT_US (400 * USEC_PER_MSEC)
+
+ #define mei_dev_to_vsc_hw(dev) ((struct mei_vsc_hw *)((dev)->hw))
+
--- /dev/null
+From a896a8a127f45d00fb69fa7536955aa9b2e5d610 Mon Sep 17 00:00:00 2001
+From: Wentong Wu <wentong.wu@intel.com>
+Date: Tue, 25 Jun 2024 16:10:45 +0800
+Subject: mei: vsc: Utilize the appropriate byte order swap function
+
+From: Wentong Wu <wentong.wu@intel.com>
+
+commit a896a8a127f45d00fb69fa7536955aa9b2e5d610 upstream.
+
+Switch from cpu_to_be32_array() to be32_to_cpu_array() for the
+received ROM data.
+
+Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
+Cc: stable@vger.kernel.org # for 6.8+
+Signed-off-by: Wentong Wu <wentong.wu@intel.com>
+Tested-by: Jason Chen <jason.z.chen@intel.com>
+Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Link: https://lore.kernel.org/r/20240625081047.4178494-4-wentong.wu@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/mei/vsc-tp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/misc/mei/vsc-tp.c
++++ b/drivers/misc/mei/vsc-tp.c
+@@ -336,7 +336,7 @@ int vsc_tp_rom_xfer(struct vsc_tp *tp, c
+ return ret;
+
+ if (ibuf)
+- cpu_to_be32_array(ibuf, tp->rx_buf, words);
++ be32_to_cpu_array(ibuf, tp->rx_buf, words);
+
+ return ret;
+ }
--- /dev/null
+From 6bef98bafd82903a8d461463f9594f19f1fd6a85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <linux@weissschuh.net>
+Date: Fri, 28 Jun 2024 12:37:04 +0100
+Subject: nvmem: core: limit cell sysfs permissions to main attribute ones
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Weißschuh <linux@weissschuh.net>
+
+commit 6bef98bafd82903a8d461463f9594f19f1fd6a85 upstream.
+
+The cell sysfs attribute should not provide more access to the nvmem
+data than the main attribute itself.
+For example if nvme_config::root_only was set, the cell attribute
+would still provide read access to everybody.
+
+Mask out permissions not available on the main attribute.
+
+Fixes: 0331c611949f ("nvmem: core: Expose cells through sysfs")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-5-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/nvmem/core.c
++++ b/drivers/nvmem/core.c
+@@ -462,7 +462,7 @@ static int nvmem_populate_sysfs_cells(st
+ "%s@%x,%x", entry->name,
+ entry->offset,
+ entry->bit_offset);
+- attrs[i].attr.mode = 0444;
++ attrs[i].attr.mode = 0444 & nvmem_bin_attr_get_umode(nvmem);
+ attrs[i].size = entry->bytes;
+ attrs[i].read = &nvmem_cell_attr_read;
+ attrs[i].private = entry;
--- /dev/null
+From 0ba424c934fd43dccf0d597e1ae8851f07cb2edf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <linux@weissschuh.net>
+Date: Fri, 28 Jun 2024 12:37:03 +0100
+Subject: nvmem: core: only change name to fram for current attribute
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Weißschuh <linux@weissschuh.net>
+
+commit 0ba424c934fd43dccf0d597e1ae8851f07cb2edf upstream.
+
+bin_attr_nvmem_eeprom_compat is the template from which all future
+compat attributes are created.
+Changing it means to change all subsquent compat attributes, too.
+
+Instead only use the "fram" name for the currently registered attribute.
+
+Fixes: fd307a4ad332 ("nvmem: prepare basics for FRAM support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-4-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/core.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/nvmem/core.c
++++ b/drivers/nvmem/core.c
+@@ -396,10 +396,9 @@ static int nvmem_sysfs_setup_compat(stru
+ if (!config->base_dev)
+ return -EINVAL;
+
+- if (config->type == NVMEM_TYPE_FRAM)
+- bin_attr_nvmem_eeprom_compat.attr.name = "fram";
+-
+ nvmem->eeprom = bin_attr_nvmem_eeprom_compat;
++ if (config->type == NVMEM_TYPE_FRAM)
++ nvmem->eeprom.attr.name = "fram";
+ nvmem->eeprom.attr.mode = nvmem_bin_attr_get_umode(nvmem);
+ nvmem->eeprom.size = nvmem->size;
+ #ifdef CONFIG_DEBUG_LOCK_ALLOC
--- /dev/null
+From 7a0a6d0a7c805f9380381f4deedffdf87b93f408 Mon Sep 17 00:00:00 2001
+From: Joy Chakraborty <joychakr@google.com>
+Date: Fri, 28 Jun 2024 12:37:02 +0100
+Subject: nvmem: meson-efuse: Fix return value of nvmem callbacks
+
+From: Joy Chakraborty <joychakr@google.com>
+
+commit 7a0a6d0a7c805f9380381f4deedffdf87b93f408 upstream.
+
+Read/write callbacks registered with nvmem core expect 0 to be returned
+on success and a negative value to be returned on failure.
+
+meson_efuse_read() and meson_efuse_write() call into
+meson_sm_call_read() and meson_sm_call_write() respectively which return
+the number of bytes read or written on success as per their api
+description.
+
+Fix to return error if meson_sm_call_read()/meson_sm_call_write()
+returns an error else return 0.
+
+Fixes: a29a63bdaf6f ("nvmem: meson-efuse: simplify read callback")
+Cc: stable@vger.kernel.org
+Signed-off-by: Joy Chakraborty <joychakr@google.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-3-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/meson-efuse.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/nvmem/meson-efuse.c
++++ b/drivers/nvmem/meson-efuse.c
+@@ -18,18 +18,24 @@ static int meson_efuse_read(void *contex
+ void *val, size_t bytes)
+ {
+ struct meson_sm_firmware *fw = context;
++ int ret;
+
+- return meson_sm_call_read(fw, (u8 *)val, bytes, SM_EFUSE_READ, offset,
+- bytes, 0, 0, 0);
++ ret = meson_sm_call_read(fw, (u8 *)val, bytes, SM_EFUSE_READ, offset,
++ bytes, 0, 0, 0);
++
++ return ret < 0 ? ret : 0;
+ }
+
+ static int meson_efuse_write(void *context, unsigned int offset,
+ void *val, size_t bytes)
+ {
+ struct meson_sm_firmware *fw = context;
++ int ret;
++
++ ret = meson_sm_call_write(fw, (u8 *)val, bytes, SM_EFUSE_WRITE, offset,
++ bytes, 0, 0, 0);
+
+- return meson_sm_call_write(fw, (u8 *)val, bytes, SM_EFUSE_WRITE, offset,
+- bytes, 0, 0, 0);
++ return ret < 0 ? ret : 0;
+ }
+
+ static const struct of_device_id meson_efuse_match[] = {
--- /dev/null
+From 28b008751aa295612318a0fbb2f22dd4f6a83139 Mon Sep 17 00:00:00 2001
+From: Joy Chakraborty <joychakr@google.com>
+Date: Fri, 28 Jun 2024 12:37:01 +0100
+Subject: nvmem: rmem: Fix return value of rmem_read()
+
+From: Joy Chakraborty <joychakr@google.com>
+
+commit 28b008751aa295612318a0fbb2f22dd4f6a83139 upstream.
+
+reg_read() callback registered with nvmem core expects 0 on success and
+a negative value on error but rmem_read() returns the number of bytes
+read which is treated as an error at the nvmem core.
+
+This does not break when rmem is accessed using sysfs via
+bin_attr_nvmem_read()/write() but causes an error when accessed from
+places like nvmem_access_with_keepouts(), etc.
+
+Change to return 0 on success and error in case
+memory_read_from_buffer() returns an error or -EIO if bytes read do not
+match what was requested.
+
+Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem")
+Cc: stable@vger.kernel.org
+Signed-off-by: Joy Chakraborty <joychakr@google.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-2-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/rmem.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvmem/rmem.c
++++ b/drivers/nvmem/rmem.c
+@@ -46,7 +46,10 @@ static int rmem_read(void *context, unsi
+
+ memunmap(addr);
+
+- return count;
++ if (count < 0)
++ return count;
++
++ return count == bytes ? 0 : -EIO;
+ }
+
+ static int rmem_probe(struct platform_device *pdev)
--- /dev/null
+From b6e02c6b0377d4339986e07aeb696c632cd392aa Mon Sep 17 00:00:00 2001
+From: Armin Wolf <W_Armin@gmx.de>
+Date: Tue, 9 Jul 2024 16:38:51 +0200
+Subject: platform/x86: toshiba_acpi: Fix array out-of-bounds access
+
+From: Armin Wolf <W_Armin@gmx.de>
+
+commit b6e02c6b0377d4339986e07aeb696c632cd392aa upstream.
+
+In order to use toshiba_dmi_quirks[] together with the standard DMI
+matching functions, it must be terminated by a empty entry.
+
+Since this entry is missing, an array out-of-bounds access occurs
+every time the quirk list is processed.
+
+Fix this by adding the terminating empty entry.
+
+Reported-by: kernel test robot <oliver.sang@intel.com>
+Closes: https://lore.kernel.org/oe-lkp/202407091536.8b116b3d-lkp@intel.com
+Fixes: 3cb1f40dfdc3 ("drivers/platform: toshiba_acpi: Call HCI_PANEL_POWER_ON on resume on some models")
+Cc: stable@vger.kernel.org
+Signed-off-by: Armin Wolf <W_Armin@gmx.de>
+Link: https://lore.kernel.org/r/20240709143851.10097-1-W_Armin@gmx.de
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/toshiba_acpi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/platform/x86/toshiba_acpi.c
++++ b/drivers/platform/x86/toshiba_acpi.c
+@@ -3304,6 +3304,7 @@ static const struct dmi_system_id toshib
+ },
+ .driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART),
+ },
++ { }
+ };
+
+ static int toshiba_acpi_add(struct acpi_device *acpi_dev)
--- /dev/null
+From 1af2156e58f3af1216ce2f0456b3b8949faa5c7e Mon Sep 17 00:00:00 2001
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Date: Tue, 25 Jun 2024 20:42:05 +0200
+Subject: serial: imx: ensure RTS signal is not left active after shutdown
+
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+
+commit 1af2156e58f3af1216ce2f0456b3b8949faa5c7e upstream.
+
+If a process is killed while writing to a /dev/ttymxc* device in RS485
+mode, we observe that the RTS signal is left high, thus making it
+impossible for other devices to transmit anything.
+
+Moreover, the ->tx_state variable is left in state SEND, which means
+that when one next opens the device and configures baud rate etc., the
+initialization code in imx_uart_set_termios dutifully ensures the RTS
+pin is pulled down, but since ->tx_state is already SEND, the logic in
+imx_uart_start_tx() does not in fact pull the pin high before
+transmitting, so nothing actually gets on the wire on the other side
+of the transceiver. Only when that transmission is allowed to complete
+is the state machine then back in a consistent state.
+
+This is completely reproducible by doing something as simple as
+
+ seq 10000 > /dev/ttymxc0
+
+and hitting ctrl-C, and watching with a logic analyzer.
+
+Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Cc: stable <stable@kernel.org>
+Reviewed-by: Marek Vasut <marex@denx.de>
+Link: https://lore.kernel.org/r/20240625184206.508837-1-linux@rasmusvillemoes.dk
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/imx.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -1560,6 +1560,7 @@ static void imx_uart_shutdown(struct uar
+ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long flags;
+ u32 ucr1, ucr2, ucr4, uts;
++ int loops;
+
+ if (sport->dma_is_enabled) {
+ dmaengine_terminate_sync(sport->dma_chan_tx);
+@@ -1622,6 +1623,56 @@ static void imx_uart_shutdown(struct uar
+ ucr4 &= ~UCR4_TCEN;
+ imx_uart_writel(sport, ucr4, UCR4);
+
++ /*
++ * We have to ensure the tx state machine ends up in OFF. This
++ * is especially important for rs485 where we must not leave
++ * the RTS signal high, blocking the bus indefinitely.
++ *
++ * All interrupts are now disabled, so imx_uart_stop_tx() will
++ * no longer be called from imx_uart_transmit_buffer(). It may
++ * still be called via the hrtimers, and if those are in play,
++ * we have to honour the delays.
++ */
++ if (sport->tx_state == WAIT_AFTER_RTS || sport->tx_state == SEND)
++ imx_uart_stop_tx(port);
++
++ /*
++ * In many cases (rs232 mode, or if tx_state was
++ * WAIT_AFTER_RTS, or if tx_state was SEND and there is no
++ * delay_rts_after_send), this will have moved directly to
++ * OFF. In rs485 mode, tx_state might already have been
++ * WAIT_AFTER_SEND and the hrtimer thus already started, or
++ * the above imx_uart_stop_tx() call could have started it. In
++ * those cases, we have to wait for the hrtimer to fire and
++ * complete the transition to OFF.
++ */
++ loops = port->rs485.flags & SER_RS485_ENABLED ?
++ port->rs485.delay_rts_after_send : 0;
++ while (sport->tx_state != OFF && loops--) {
++ uart_port_unlock_irqrestore(&sport->port, flags);
++ msleep(1);
++ uart_port_lock_irqsave(&sport->port, &flags);
++ }
++
++ if (sport->tx_state != OFF) {
++ dev_warn(sport->port.dev, "unexpected tx_state %d\n",
++ sport->tx_state);
++ /*
++ * This machine may be busted, but ensure the RTS
++ * signal is inactive in order not to block other
++ * devices.
++ */
++ if (port->rs485.flags & SER_RS485_ENABLED) {
++ ucr2 = imx_uart_readl(sport, UCR2);
++ if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
++ imx_uart_rts_active(sport, &ucr2);
++ else
++ imx_uart_rts_inactive(sport, &ucr2);
++ imx_uart_writel(sport, ucr2, UCR2);
++ }
++ sport->tx_state = OFF;
++ }
++
+ uart_port_unlock_irqrestore(&sport->port, flags);
+
+ clk_disable_unprepare(sport->clk_per);
mm-filemap-make-max_pagecache_order-acceptable-to-xarray.patch
ksmbd-discard-write-access-to-the-directory-open.patch
scsi-sd-do-not-repeat-the-starting-disk-message.patch
+iio-trigger-fix-condition-for-own-trigger.patch
+arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch
+arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch
+arm64-dts-qcom-x1e80100-crd-fix-wcd-audio-codec-tx-port-mapping.patch
+arm64-dts-qcom-x1e80100-crd-fix-dai-used-for-headset-recording.patch
+nvmem-rmem-fix-return-value-of-rmem_read.patch
+nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch
+nvmem-core-only-change-name-to-fram-for-current-attribute.patch
+nvmem-core-limit-cell-sysfs-permissions-to-main-attribute-ones.patch
+platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch
+tty-serial-ma35d1-add-a-null-check-for-of_node.patch
+serial-imx-ensure-rts-signal-is-not-left-active-after-shutdown.patch
+alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch
+alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch
+alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch
+mei-vsc-enhance-ivsc-chipset-stability-during-warm-reboot.patch
+mei-vsc-prevent-timeout-error-with-added-delay-post-firmware-download.patch
+mei-vsc-utilize-the-appropriate-byte-order-swap-function.patch
--- /dev/null
+From acd09ac253b5de8fd79fc61a482ee19154914c7a Mon Sep 17 00:00:00 2001
+From: Jacky Huang <ychuang3@nuvoton.com>
+Date: Tue, 25 Jun 2024 06:41:28 +0000
+Subject: tty: serial: ma35d1: Add a NULL check for of_node
+
+From: Jacky Huang <ychuang3@nuvoton.com>
+
+commit acd09ac253b5de8fd79fc61a482ee19154914c7a upstream.
+
+The pdev->dev.of_node can be NULL if the "serial" node is absent.
+Add a NULL check to return an error in such cases.
+
+Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
+Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
+Closes: https://lore.kernel.org/all/8df7ce45-fd58-4235-88f7-43fe7cd67e8f@moroto.mountain/
+Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20240625064128.127-1-ychuang570808@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/ma35d1_serial.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/drivers/tty/serial/ma35d1_serial.c
++++ b/drivers/tty/serial/ma35d1_serial.c
+@@ -688,12 +688,13 @@ static int ma35d1serial_probe(struct pla
+ struct uart_ma35d1_port *up;
+ int ret = 0;
+
+- if (pdev->dev.of_node) {
+- ret = of_alias_get_id(pdev->dev.of_node, "serial");
+- if (ret < 0) {
+- dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n", ret);
+- return ret;
+- }
++ if (!pdev->dev.of_node)
++ return -ENODEV;
++
++ ret = of_alias_get_id(pdev->dev.of_node, "serial");
++ if (ret < 0) {
++ dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n", ret);
++ return ret;
+ }
+ up = &ma35d1serial_ports[ret];
+ up->port.line = ret;