]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 13:59:26 +0000 (14:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 13:59:26 +0000 (14:59 +0100)
added patches:
auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch
input-xpad-add-hyperx-clutch-gladiate-support.patch
serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch
serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch

queue-6.1/auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch [new file with mode: 0644]
queue-6.1/input-xpad-add-hyperx-clutch-gladiate-support.patch [new file with mode: 0644]
queue-6.1/serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch [new file with mode: 0644]
queue-6.1/serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch b/queue-6.1/auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch
new file mode 100644 (file)
index 0000000..5e0fb7d
--- /dev/null
@@ -0,0 +1,56 @@
+From 35b464e32c8bccef435e415db955787ead4ab44c Mon Sep 17 00:00:00 2001
+From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+Date: Sat, 22 Jul 2023 14:09:25 -0400
+Subject: auxdisplay: hd44780: move cursor home after clear display command
+
+From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+
+commit 35b464e32c8bccef435e415db955787ead4ab44c upstream.
+
+The DISPLAY_CLEAR command on the NewHaven NHD-0220DZW-AG5 display
+does NOT change the DDRAM address to 00h (home position) like the
+standard Hitachi HD44780 controller. As a consequence, the starting
+position of the initial string LCD_INIT_TEXT is not guaranteed to be
+at 0,0 depending on where the cursor was before the DISPLAY_CLEAR
+command.
+
+Extract of DISPLAY_CLEAR command from datasheets of:
+
+    Hitachi HD44780:
+        ... It then sets DDRAM address 0 into the address counter...
+
+    NewHaven NHD-0220DZW-AG5 datasheet:
+       ... This instruction does not change the DDRAM Address
+
+Move the cursor home after sending DISPLAY_CLEAR command to support
+non-standard LCDs.
+
+Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Tested-by: David Reaver <me@davidreaver.com>
+Link: https://lore.kernel.org/r/20230722180925.1408885-1-hugo@hugovil.com
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/auxdisplay/hd44780_common.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/auxdisplay/hd44780_common.c
++++ b/drivers/auxdisplay/hd44780_common.c
+@@ -82,7 +82,15 @@ int hd44780_common_clear_display(struct
+       hdc->write_cmd(hdc, LCD_CMD_DISPLAY_CLEAR);
+       /* datasheet says to wait 1,64 milliseconds */
+       long_sleep(2);
+-      return 0;
++
++      /*
++       * The Hitachi HD44780 controller (and compatible ones) reset the DDRAM
++       * address when executing the DISPLAY_CLEAR command, thus the
++       * following call is not required. However, other controllers do not
++       * (e.g. NewHaven NHD-0220DZW-AG5), thus move the cursor to home
++       * unconditionally to support both.
++       */
++      return hd44780_common_home(lcd);
+ }
+ EXPORT_SYMBOL_GPL(hd44780_common_clear_display);
diff --git a/queue-6.1/input-xpad-add-hyperx-clutch-gladiate-support.patch b/queue-6.1/input-xpad-add-hyperx-clutch-gladiate-support.patch
new file mode 100644 (file)
index 0000000..0c875b2
--- /dev/null
@@ -0,0 +1,40 @@
+From e28a0974d749e5105d77233c0a84d35c37da047e Mon Sep 17 00:00:00 2001
+From: Max Nguyen <maxwell.nguyen@hp.com>
+Date: Sun, 17 Sep 2023 22:21:53 -0700
+Subject: Input: xpad - add HyperX Clutch Gladiate Support
+
+From: Max Nguyen <maxwell.nguyen@hp.com>
+
+commit e28a0974d749e5105d77233c0a84d35c37da047e upstream.
+
+Add HyperX controller support to xpad_device and xpad_table.
+
+Suggested-by: Chris Toledanes <chris.toledanes@hp.com>
+Reviewed-by: Carl Ng <carl.ng@hp.com>
+Signed-off-by: Max Nguyen <maxwell.nguyen@hp.com>
+Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
+Link: https://lore.kernel.org/r/20230906231514.4291-1-hphyperxdev@gmail.com
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/input/joystick/xpad.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/input/joystick/xpad.c
++++ b/drivers/input/joystick/xpad.c
+@@ -136,6 +136,7 @@ static const struct xpad_device {
+       { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
+       { 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
+       { 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
++      { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE },
+       { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
+       { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
+       { 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
+@@ -459,6 +460,7 @@ static const struct usb_device_id xpad_t
+       XPAD_XBOX360_VENDOR(0x0079),            /* GPD Win 2 Controller */
+       XPAD_XBOX360_VENDOR(0x03eb),            /* Wooting Keyboards (Legacy) */
+       XPAD_XBOX360_VENDOR(0x044f),            /* Thrustmaster X-Box 360 controllers */
++      XPAD_XBOXONE_VENDOR(0x03f0),            /* HP HyperX Xbox One Controllers */
+       XPAD_XBOX360_VENDOR(0x045e),            /* Microsoft X-Box 360 controllers */
+       XPAD_XBOXONE_VENDOR(0x045e),            /* Microsoft X-Box One controllers */
+       XPAD_XBOX360_VENDOR(0x046d),            /* Logitech X-Box 360 style controllers */
diff --git a/queue-6.1/serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch b/queue-6.1/serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch
new file mode 100644 (file)
index 0000000..a00a7bb
--- /dev/null
@@ -0,0 +1,39 @@
+From b4a778303ea0fcabcaff974721477a5743e1f8ec Mon Sep 17 00:00:00 2001
+From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+Date: Mon, 7 Aug 2023 17:45:56 -0400
+Subject: serial: sc16is7xx: add missing support for rs485 devicetree properties
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+
+commit b4a778303ea0fcabcaff974721477a5743e1f8ec upstream.
+
+Retrieve rs485 devicetree properties on registration of sc16is7xx ports in
+case they are attached to an rs485 transceiver.
+
+Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
+Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
+Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
+Link: https://lore.kernel.org/r/20230807214556.540627-7-hugo@hugovil.com
+Cc: Hugo Villeneuve <hugo@hugovil.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sc16is7xx.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/tty/serial/sc16is7xx.c
++++ b/drivers/tty/serial/sc16is7xx.c
+@@ -1556,6 +1556,10 @@ static int sc16is7xx_probe(struct device
+                       goto out_ports;
+               }
++              ret = uart_get_rs485_mode(&s->p[i].port);
++              if (ret)
++                      goto out_ports;
++
+               /* Disable all interrupts */
+               sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_IER_REG, 0);
+               /* Disable TX/RX */
diff --git a/queue-6.1/serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch b/queue-6.1/serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch
new file mode 100644 (file)
index 0000000..311e22c
--- /dev/null
@@ -0,0 +1,37 @@
+From 77a82cebf0eb023203b4cb2235cab75afc77cccf Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Mon, 24 Jul 2023 11:47:27 +0800
+Subject: serial: sc16is7xx: Put IOControl register into regmap_volatile
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit 77a82cebf0eb023203b4cb2235cab75afc77cccf upstream.
+
+According to the IOControl register bits description in the page 31 of
+the product datasheet, we know the bit 3 of IOControl register is
+softreset, this bit will self-clearing once the reset finish.
+
+In the probe, the softreset bit is set, and when we read this register
+from debugfs/regmap interface, we found the softreset bit is still
+setting, this confused us for a while. Finally we found this register
+is cached, to read the real value from register, we could put it
+into the regmap_volatile().
+
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Link: https://lore.kernel.org/r/20230724034727.17335-1-hui.wang@canonical.com
+Cc: Hugo Villeneuve <hugo@hugovil.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sc16is7xx.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/tty/serial/sc16is7xx.c
++++ b/drivers/tty/serial/sc16is7xx.c
+@@ -486,6 +486,7 @@ static bool sc16is7xx_regmap_volatile(st
+       case SC16IS7XX_TXLVL_REG:
+       case SC16IS7XX_RXLVL_REG:
+       case SC16IS7XX_IOSTATE_REG:
++      case SC16IS7XX_IOCONTROL_REG:
+               return true;
+       default:
+               break;
index 70e087eb343b0faac5c9e501954f96ee3fafe75c..4857044d09a9fbda290401f4af2bfa66968230d2 100644 (file)
@@ -47,3 +47,7 @@ btrfs-fix-off-by-one-when-checking-chunk-map-includes-logical-address.patch
 btrfs-send-ensure-send_fd-is-writable.patch
 btrfs-make-error-messages-more-clear-when-getting-a-chunk-map.patch
 btrfs-fix-64bit-compat-send-ioctl-arguments-not-initializing-version-member.patch
+input-xpad-add-hyperx-clutch-gladiate-support.patch
+auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch
+serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch
+serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch