]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 May 2025 10:23:19 +0000 (12:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 May 2025 10:23:19 +0000 (12:23 +0200)
added patches:
iio-adc-ad7606-fix-serial-register-access.patch
iio-adis16201-correct-inclinometer-channel-resolution.patch
iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_fifo.patch
iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_tagged_fifo.patch
usb-uhci-platform-make-the-clock-really-optional.patch

queue-5.4/iio-adc-ad7606-fix-serial-register-access.patch [new file with mode: 0644]
queue-5.4/iio-adis16201-correct-inclinometer-channel-resolution.patch [new file with mode: 0644]
queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_fifo.patch [new file with mode: 0644]
queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_tagged_fifo.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/usb-uhci-platform-make-the-clock-really-optional.patch [new file with mode: 0644]

diff --git a/queue-5.4/iio-adc-ad7606-fix-serial-register-access.patch b/queue-5.4/iio-adc-ad7606-fix-serial-register-access.patch
new file mode 100644 (file)
index 0000000..79776c1
--- /dev/null
@@ -0,0 +1,38 @@
+From f083f8a21cc785ebe3a33f756a3fa3660611f8db Mon Sep 17 00:00:00 2001
+From: Angelo Dureghello <adureghello@baylibre.com>
+Date: Fri, 18 Apr 2025 20:37:53 +0200
+Subject: iio: adc: ad7606: fix serial register access
+
+From: Angelo Dureghello <adureghello@baylibre.com>
+
+commit f083f8a21cc785ebe3a33f756a3fa3660611f8db upstream.
+
+Fix register read/write routine as per datasheet.
+
+When reading multiple consecutive registers, only the first one is read
+properly. This is due to missing chip select deassert and assert again
+between first and second 16bit transfer, as shown in the datasheet
+AD7606C-16, rev 0, figure 110.
+
+Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616")
+Reviewed-by: David Lechner <dlechner@baylibre.com>
+Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
+Link: https://patch.msgid.link/20250418-wip-bl-ad7606-fix-reg-access-v3-1-d5eeb440c738@baylibre.com
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/adc/ad7606_spi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iio/adc/ad7606_spi.c
++++ b/drivers/iio/adc/ad7606_spi.c
+@@ -127,7 +127,7 @@ static int ad7606_spi_reg_read(struct ad
+               {
+                       .tx_buf = &st->d16[0],
+                       .len = 2,
+-                      .cs_change = 0,
++                      .cs_change = 1,
+               }, {
+                       .rx_buf = &st->d16[1],
+                       .len = 2,
diff --git a/queue-5.4/iio-adis16201-correct-inclinometer-channel-resolution.patch b/queue-5.4/iio-adis16201-correct-inclinometer-channel-resolution.patch
new file mode 100644 (file)
index 0000000..c0cb5d2
--- /dev/null
@@ -0,0 +1,40 @@
+From 609bc31eca06c7408e6860d8b46311ebe45c1fef Mon Sep 17 00:00:00 2001
+From: Gabriel Shahrouzi <gshahrouzi@gmail.com>
+Date: Mon, 21 Apr 2025 09:15:39 -0400
+Subject: iio: adis16201: Correct inclinometer channel resolution
+
+From: Gabriel Shahrouzi <gshahrouzi@gmail.com>
+
+commit 609bc31eca06c7408e6860d8b46311ebe45c1fef upstream.
+
+The inclinometer channels were previously defined with 14 realbits.
+However, the ADIS16201 datasheet states the resolution for these output
+channels is 12 bits (Page 14, text description; Page 15, table 7).
+
+Correct the realbits value to 12 to accurately reflect the hardware.
+
+Fixes: f7fe1d1dd5a5 ("staging: iio: new adis16201 driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Gabriel Shahrouzi <gshahrouzi@gmail.com>
+Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
+Link: https://patch.msgid.link/20250421131539.912966-1-gshahrouzi@gmail.com
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/accel/adis16201.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/iio/accel/adis16201.c
++++ b/drivers/iio/accel/adis16201.c
+@@ -214,9 +214,9 @@ static const struct iio_chan_spec adis16
+                       BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
+       ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12),
+       ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X,
+-                      BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
++                      BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
+       ADIS_INCLI_CHAN(Y, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y,
+-                      BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
++                      BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
+       IIO_CHAN_SOFT_TIMESTAMP(7)
+ };
diff --git a/queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_fifo.patch b/queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_fifo.patch
new file mode 100644 (file)
index 0000000..d23984c
--- /dev/null
@@ -0,0 +1,35 @@
+From 159ca7f18129834b6f4c7eae67de48e96c752fc9 Mon Sep 17 00:00:00 2001
+From: Silvano Seva <s.seva@4sigma.it>
+Date: Tue, 11 Mar 2025 09:49:47 +0100
+Subject: iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
+
+From: Silvano Seva <s.seva@4sigma.it>
+
+commit 159ca7f18129834b6f4c7eae67de48e96c752fc9 upstream.
+
+Prevent st_lsm6dsx_read_fifo from falling in an infinite loop in case
+pattern_len is equal to zero and the device FIFO is not empty.
+
+Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
+Signed-off-by: Silvano Seva <s.seva@4sigma.it>
+Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Link: https://patch.msgid.link/20250311085030.3593-2-s.seva@4sigma.it
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
++++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+@@ -360,6 +360,9 @@ int st_lsm6dsx_read_fifo(struct st_lsm6d
+       if (fifo_status & cpu_to_le16(ST_LSM6DSX_FIFO_EMPTY_MASK))
+               return 0;
++      if (!pattern_len)
++              pattern_len = ST_LSM6DSX_SAMPLE_SIZE;
++
+       fifo_len = (le16_to_cpu(fifo_status) & fifo_diff_mask) *
+                  ST_LSM6DSX_CHAN_SIZE;
+       fifo_len = (fifo_len / pattern_len) * pattern_len;
diff --git a/queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_tagged_fifo.patch b/queue-5.4/iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_tagged_fifo.patch
new file mode 100644 (file)
index 0000000..8c806d7
--- /dev/null
@@ -0,0 +1,35 @@
+From 8114ef86e2058e2554111b793596f17bee23fa15 Mon Sep 17 00:00:00 2001
+From: Silvano Seva <s.seva@4sigma.it>
+Date: Tue, 11 Mar 2025 09:49:49 +0100
+Subject: iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
+
+From: Silvano Seva <s.seva@4sigma.it>
+
+commit 8114ef86e2058e2554111b793596f17bee23fa15 upstream.
+
+Prevent st_lsm6dsx_read_tagged_fifo from falling in an infinite loop in
+case pattern_len is equal to zero and the device FIFO is not empty.
+
+Fixes: 801a6e0af0c6 ("iio: imu: st_lsm6dsx: add support to LSM6DSO")
+Signed-off-by: Silvano Seva <s.seva@4sigma.it>
+Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Link: https://patch.msgid.link/20250311085030.3593-4-s.seva@4sigma.it
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
++++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+@@ -541,6 +541,9 @@ int st_lsm6dsx_read_tagged_fifo(struct s
+       if (!fifo_len)
+               return 0;
++      if (!pattern_len)
++              pattern_len = ST_LSM6DSX_TAGGED_SAMPLE_SIZE;
++
+       for (read_len = 0; read_len < fifo_len; read_len += pattern_len) {
+               err = st_lsm6dsx_read_block(hw,
+                                           ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,
index 53825863e2fb7dd8b6cf0bebbdbbf793e480e796..1b6b24eca279bcf9fe22d944e8f72f592a6d847e 100644 (file)
@@ -38,3 +38,8 @@ input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch
 input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch
 input-synaptics-enable-intertouch-on-dell-precision-m3800.patch
 staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch
+iio-adc-ad7606-fix-serial-register-access.patch
+iio-adis16201-correct-inclinometer-channel-resolution.patch
+iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_fifo.patch
+iio-imu-st_lsm6dsx-fix-possible-lockup-in-st_lsm6dsx_read_tagged_fifo.patch
+usb-uhci-platform-make-the-clock-really-optional.patch
diff --git a/queue-5.4/usb-uhci-platform-make-the-clock-really-optional.patch b/queue-5.4/usb-uhci-platform-make-the-clock-really-optional.patch
new file mode 100644 (file)
index 0000000..0a24fd7
--- /dev/null
@@ -0,0 +1,39 @@
+From a5c7973539b010874a37a0e846e62ac6f00553ba Mon Sep 17 00:00:00 2001
+From: Alexey Charkov <alchark@gmail.com>
+Date: Fri, 25 Apr 2025 18:11:11 +0400
+Subject: usb: uhci-platform: Make the clock really optional
+
+From: Alexey Charkov <alchark@gmail.com>
+
+commit a5c7973539b010874a37a0e846e62ac6f00553ba upstream.
+
+Device tree bindings state that the clock is optional for UHCI platform
+controllers, and some existing device trees don't provide those - such
+as those for VIA/WonderMedia devices.
+
+The driver however fails to probe now if no clock is provided, because
+devm_clk_get returns an error pointer in such case.
+
+Switch to devm_clk_get_optional instead, so that it could probe again
+on those platforms where no clocks are given.
+
+Cc: stable <stable@kernel.org>
+Fixes: 26c502701c52 ("usb: uhci: Add clk support to uhci-platform")
+Signed-off-by: Alexey Charkov <alchark@gmail.com>
+Link: https://lore.kernel.org/r/20250425-uhci-clock-optional-v1-1-a1d462592f29@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/uhci-platform.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/uhci-platform.c
++++ b/drivers/usb/host/uhci-platform.c
+@@ -122,7 +122,7 @@ static int uhci_hcd_platform_probe(struc
+       }
+       /* Get and enable clock if any specified */
+-      uhci->clk = devm_clk_get(&pdev->dev, NULL);
++      uhci->clk = devm_clk_get_optional(&pdev->dev, NULL);
+       if (IS_ERR(uhci->clk)) {
+               ret = PTR_ERR(uhci->clk);
+               goto err_rmr;