From: Greg Kroah-Hartman Date: Sun, 3 Dec 2023 13:59:26 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v4.14.332~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f9ccb0b73e5eaae0f06f584d255a5b8d999267c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches 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 --- 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 index 00000000000..5e0fb7d0e91 --- /dev/null +++ b/queue-6.1/auxdisplay-hd44780-move-cursor-home-after-clear-display-command.patch @@ -0,0 +1,56 @@ +From 35b464e32c8bccef435e415db955787ead4ab44c Mon Sep 17 00:00:00 2001 +From: Hugo Villeneuve +Date: Sat, 22 Jul 2023 14:09:25 -0400 +Subject: auxdisplay: hd44780: move cursor home after clear display command + +From: Hugo Villeneuve + +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 +Reviewed-by: Geert Uytterhoeven +Tested-by: David Reaver +Link: https://lore.kernel.org/r/20230722180925.1408885-1-hugo@hugovil.com +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..0c875b29111 --- /dev/null +++ b/queue-6.1/input-xpad-add-hyperx-clutch-gladiate-support.patch @@ -0,0 +1,40 @@ +From e28a0974d749e5105d77233c0a84d35c37da047e Mon Sep 17 00:00:00 2001 +From: Max Nguyen +Date: Sun, 17 Sep 2023 22:21:53 -0700 +Subject: Input: xpad - add HyperX Clutch Gladiate Support + +From: Max Nguyen + +commit e28a0974d749e5105d77233c0a84d35c37da047e upstream. + +Add HyperX controller support to xpad_device and xpad_table. + +Suggested-by: Chris Toledanes +Reviewed-by: Carl Ng +Signed-off-by: Max Nguyen +Reviewed-by: Rahul Rameshbabu +Link: https://lore.kernel.org/r/20230906231514.4291-1-hphyperxdev@gmail.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..a00a7bb1c0f --- /dev/null +++ b/queue-6.1/serial-sc16is7xx-add-missing-support-for-rs485-devicetree-properties.patch @@ -0,0 +1,39 @@ +From b4a778303ea0fcabcaff974721477a5743e1f8ec Mon Sep 17 00:00:00 2001 +From: Hugo Villeneuve +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 + +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 +Reviewed-by: Ilpo Järvinen +Reviewed-by: Lech Perczak +Tested-by: Lech Perczak +Link: https://lore.kernel.org/r/20230807214556.540627-7-hugo@hugovil.com +Cc: Hugo Villeneuve +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..311e22c3bed --- /dev/null +++ b/queue-6.1/serial-sc16is7xx-put-iocontrol-register-into-regmap_volatile.patch @@ -0,0 +1,37 @@ +From 77a82cebf0eb023203b4cb2235cab75afc77cccf Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Mon, 24 Jul 2023 11:47:27 +0800 +Subject: serial: sc16is7xx: Put IOControl register into regmap_volatile + +From: Hui Wang + +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 +Link: https://lore.kernel.org/r/20230724034727.17335-1-hui.wang@canonical.com +Cc: Hugo Villeneuve +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-6.1/series b/queue-6.1/series index 70e087eb343..4857044d09a 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -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