+++ /dev/null
-From 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:09 -0500
-Subject: serial: sc16is7xx: add check for unsupported SPI modes during probe
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 upstream.
-
-The original comment is confusing because it implies that variants other
-than the SC16IS762 supports other SPI modes beside SPI_MODE_0.
-
-Extract from datasheet:
- The SC16IS762 differs from the SC16IS752 in that it supports SPI clock
- speeds up to 15 Mbit/s instead of the 4 Mbit/s supported by the
- SC16IS752... In all other aspects, the SC16IS762 is functionally and
- electrically the same as the SC16IS752.
-
-The same is also true of the SC16IS760 variant versus the SC16IS740 and
-SC16IS750 variants.
-
-For all variants, only SPI mode 0 is supported.
-
-Change comment and abort probing if the specified SPI mode is not
-SPI_MODE_0.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-3-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -1406,7 +1406,10 @@ static int sc16is7xx_spi_probe(struct sp
-
- /* Setup SPI bus */
- spi->bits_per_word = 8;
-- /* only supports mode 0 on SC16IS762 */
-+ /* For all variants, only mode 0 is supported */
-+ if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
-+ return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-+
- spi->mode = spi->mode ? : SPI_MODE_0;
- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
- ret = spi_setup(spi);
+++ /dev/null
-From 3ef79cd1412236d884ab0c46b4d1921380807b48 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:10 -0500
-Subject: serial: sc16is7xx: set safe default SPI clock frequency
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 3ef79cd1412236d884ab0c46b4d1921380807b48 upstream.
-
-15 MHz is supported only by 76x variants.
-
-If the SPI clock frequency is not specified, use a safe default clock value
-of 4 MHz that is supported by all variants.
-
-Also use HZ_PER_MHZ macro to improve readability.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-4-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -24,6 +24,7 @@
- #include <linux/tty_flip.h>
- #include <linux/spi/spi.h>
- #include <linux/uaccess.h>
-+#include <linux/units.h>
- #include <uapi/linux/sched/types.h>
-
- #define SC16IS7XX_NAME "sc16is7xx"
-@@ -1411,7 +1412,7 @@ static int sc16is7xx_spi_probe(struct sp
- return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-
- spi->mode = spi->mode ? : SPI_MODE_0;
-- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
-+ spi->max_speed_hz = spi->max_speed_hz ? : 4 * HZ_PER_MHZ;
- ret = spi_setup(spi);
- if (ret)
- return ret;
wifi-rtlwifi-convert-lnkctl-change-to-pcie-cap-rmw-accessors.patch
wifi-mwifiex-configure-bssid-consistently-when-starting-ap.patch
hid-wacom-correct-behavior-when-processing-some-confidence-false-touches.patch
-serial-sc16is7xx-add-check-for-unsupported-spi-modes-during-probe.patch
-serial-sc16is7xx-set-safe-default-spi-clock-frequency.patch
+++ /dev/null
-From 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:09 -0500
-Subject: serial: sc16is7xx: add check for unsupported SPI modes during probe
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 upstream.
-
-The original comment is confusing because it implies that variants other
-than the SC16IS762 supports other SPI modes beside SPI_MODE_0.
-
-Extract from datasheet:
- The SC16IS762 differs from the SC16IS752 in that it supports SPI clock
- speeds up to 15 Mbit/s instead of the 4 Mbit/s supported by the
- SC16IS752... In all other aspects, the SC16IS762 is functionally and
- electrically the same as the SC16IS752.
-
-The same is also true of the SC16IS760 variant versus the SC16IS740 and
-SC16IS750 variants.
-
-For all variants, only SPI mode 0 is supported.
-
-Change comment and abort probing if the specified SPI mode is not
-SPI_MODE_0.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-3-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -1449,7 +1449,10 @@ static int sc16is7xx_spi_probe(struct sp
-
- /* Setup SPI bus */
- spi->bits_per_word = 8;
-- /* only supports mode 0 on SC16IS762 */
-+ /* For all variants, only mode 0 is supported */
-+ if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
-+ return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-+
- spi->mode = spi->mode ? : SPI_MODE_0;
- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
- ret = spi_setup(spi);
+++ /dev/null
-From 3ef79cd1412236d884ab0c46b4d1921380807b48 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:10 -0500
-Subject: serial: sc16is7xx: set safe default SPI clock frequency
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 3ef79cd1412236d884ab0c46b4d1921380807b48 upstream.
-
-15 MHz is supported only by 76x variants.
-
-If the SPI clock frequency is not specified, use a safe default clock value
-of 4 MHz that is supported by all variants.
-
-Also use HZ_PER_MHZ macro to improve readability.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-4-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -24,6 +24,7 @@
- #include <linux/tty_flip.h>
- #include <linux/spi/spi.h>
- #include <linux/uaccess.h>
-+#include <linux/units.h>
- #include <uapi/linux/sched/types.h>
-
- #define SC16IS7XX_NAME "sc16is7xx"
-@@ -1454,7 +1455,7 @@ static int sc16is7xx_spi_probe(struct sp
- return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-
- spi->mode = spi->mode ? : SPI_MODE_0;
-- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
-+ spi->max_speed_hz = spi->max_speed_hz ? : 4 * HZ_PER_MHZ;
- ret = spi_setup(spi);
- if (ret)
- return ret;
iio-adc-ad7091r-allow-users-to-configure-device-events.patch
iio-adc-ad7091r-enable-internal-vref-if-external-vref-is-not-supplied.patch
hid-wacom-correct-behavior-when-processing-some-confidence-false-touches.patch
-serial-sc16is7xx-add-check-for-unsupported-spi-modes-during-probe.patch
-serial-sc16is7xx-set-safe-default-spi-clock-frequency.patch
+++ /dev/null
-From 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:09 -0500
-Subject: serial: sc16is7xx: add check for unsupported SPI modes during probe
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 upstream.
-
-The original comment is confusing because it implies that variants other
-than the SC16IS762 supports other SPI modes beside SPI_MODE_0.
-
-Extract from datasheet:
- The SC16IS762 differs from the SC16IS752 in that it supports SPI clock
- speeds up to 15 Mbit/s instead of the 4 Mbit/s supported by the
- SC16IS752... In all other aspects, the SC16IS762 is functionally and
- electrically the same as the SC16IS752.
-
-The same is also true of the SC16IS760 variant versus the SC16IS740 and
-SC16IS750 variants.
-
-For all variants, only SPI mode 0 is supported.
-
-Change comment and abort probing if the specified SPI mode is not
-SPI_MODE_0.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-3-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -1412,7 +1412,10 @@ static int sc16is7xx_spi_probe(struct sp
-
- /* Setup SPI bus */
- spi->bits_per_word = 8;
-- /* only supports mode 0 on SC16IS762 */
-+ /* For all variants, only mode 0 is supported */
-+ if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
-+ return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-+
- spi->mode = spi->mode ? : SPI_MODE_0;
- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
- ret = spi_setup(spi);
+++ /dev/null
-From 3ef79cd1412236d884ab0c46b4d1921380807b48 Mon Sep 17 00:00:00 2001
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Date: Thu, 21 Dec 2023 18:18:10 -0500
-Subject: serial: sc16is7xx: set safe default SPI clock frequency
-
-From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-
-commit 3ef79cd1412236d884ab0c46b4d1921380807b48 upstream.
-
-15 MHz is supported only by 76x variants.
-
-If the SPI clock frequency is not specified, use a safe default clock value
-of 4 MHz that is supported by all variants.
-
-Also use HZ_PER_MHZ macro to improve readability.
-
-Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
-Link: https://lore.kernel.org/r/20231221231823.2327894-4-hugo@hugovil.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/sc16is7xx.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/tty/serial/sc16is7xx.c
-+++ b/drivers/tty/serial/sc16is7xx.c
-@@ -24,6 +24,7 @@
- #include <linux/tty_flip.h>
- #include <linux/spi/spi.h>
- #include <linux/uaccess.h>
-+#include <linux/units.h>
- #include <uapi/linux/sched/types.h>
-
- #define SC16IS7XX_NAME "sc16is7xx"
-@@ -1417,7 +1418,7 @@ static int sc16is7xx_spi_probe(struct sp
- return dev_err_probe(&spi->dev, -EINVAL, "Unsupported SPI mode\n");
-
- spi->mode = spi->mode ? : SPI_MODE_0;
-- spi->max_speed_hz = spi->max_speed_hz ? : 15000000;
-+ spi->max_speed_hz = spi->max_speed_hz ? : 4 * HZ_PER_MHZ;
- ret = spi_setup(spi);
- if (ret)
- return ret;
wifi-mwifiex-configure-bssid-consistently-when-starting-ap.patch
x86-kvm-do-not-try-to-disable-kvmclock-if-it-was-not-enabled.patch
hid-wacom-correct-behavior-when-processing-some-confidence-false-touches.patch
-serial-sc16is7xx-add-check-for-unsupported-spi-modes-during-probe.patch
-serial-sc16is7xx-set-safe-default-spi-clock-frequency.patch