Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH] Input: add keycodes for contextual AI usages (HUTRR119)
From: Jiri Kosina @ 2026-03-29 20:02 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Akshai Murari, Benjamin Tissoires, linux-input, linux-kernel
In-Reply-To: <acatScfJMhlD2uOj@google.com>

On Fri, 27 Mar 2026, Dmitry Torokhov wrote:

> > HUTRR119 introduces new usages for keys intended to invoke AI agents
> > based on the current context. These are useful with the increasing
> > number of operating systems with integrated Large Language Models
> > 
> > Add new key definitions for KEY_ACTION_ON_SELECTION,
> > KEY_CONTEXTUAL_INSERT and KEY_CONTEXTUAL_QUERY
> > 
> > Signed-off-by: Akshai Murari <akshaim@google.com>
> 
> Jiri, Benjamin, how do you want to merge this?
> 
> Just in case:
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Perfect, thanks a lot Dmitry. Now in hid.git#for-7.0/upstream-fixes.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* [PATCH RESEND] input: xpad: Add support for BETOP BTP-KP50B/C controller's wireless mode
From: Shengyu Qu @ 2026-03-29 17:56 UTC (permalink / raw)
  To: dmitry.torokhov, vi, linux-input, linux-kernel; +Cc: Shengyu Qu

BETOP's BTP-KP50B and BTP-KP50C controller's wireless dongles are both
working as standard Xbox 360 controllers. Add USB device IDs for them to
xpad driver.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
---
 drivers/input/joystick/xpad.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index bf4accf3f581b..4eb85fa933f4b 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -360,6 +360,8 @@ static const struct xpad_device {
 	{ 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
 	{ 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
 	{ 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
+	{ 0x20bc, 0x5134, "BETOP BTP-KP50B Xinput Dongle", 0, XTYPE_XBOX360 },
+	{ 0x20bc, 0x514a, "BETOP BTP-KP50C Xinput Dongle", 0, XTYPE_XBOX360 },
 	{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
 	{ 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
 	{ 0x20d6, 0x2064, "PowerA Wired Controller for Xbox", MAP_SHARE_BUTTON, XTYPE_XBOXONE },
@@ -562,6 +564,7 @@ static const struct usb_device_id xpad_table[] = {
 	XPAD_XBOX360_VENDOR(0x1a86),		/* Nanjing Qinheng Microelectronics (WCH) */
 	XPAD_XBOX360_VENDOR(0x1bad),		/* Harmonix Rock Band guitar and drums */
 	XPAD_XBOX360_VENDOR(0x1ee9),		/* ZOTAC Technology Limited */
+	XPAD_XBOX360_VENDOR(0x20bc),		/* BETOP wireless dongles */
 	XPAD_XBOX360_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOXONE_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOX360_VENDOR(0x2345),		/* Machenike Controllers */
-- 
2.53.0


^ permalink raw reply related

* [PATCH] update email address and firmware url for Dreamcast
From: Adrian McMenamin @ 2026-03-29 16:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-input, linux-sound, linux-doc, Adrian McMenamin


These patches replace my old email address with my current email
address, should anyone wish to contact me about these devices.
Additionally they update information about where to get the firware for
the Dreamcast sound driver.
Beyond embedding a different string for my email address they don't
change any build outcome and are a low priority for a change: but it
would be helpful to the small, but still active, Dreamcast community to
update this.

Adrian McMenamin

---
 Documentation/fb/pvr2fb.rst           | 2 +-
 drivers/cdrom/gdrom.c                 | 2 +-
 drivers/input/joystick/maplecontrol.c | 2 +-
 drivers/input/keyboard/maple_keyb.c   | 2 +-
 drivers/input/mouse/maplemouse.c      | 2 +-
 sound/sh/aica.c                       | 8 ++++----
 sound/sh/aica.h                       | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/fb/pvr2fb.rst b/Documentation/fb/pvr2fb.rst
index 315ce085a585..6887044044d1 100644
--- a/Documentation/fb/pvr2fb.rst
+++ b/Documentation/fb/pvr2fb.rst
@@ -63,4 +63,4 @@ on any 2.6 series kernel.
 
 Paul Mundt <lethal@linuxdc.org>
 
-Updated by Adrian McMenamin <adrian@mcmen.demon.co.uk>
+Updated by Adrian McMenamin <adrianmcmenamin@gmail.com>
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 4ba4dd06cbf4..cab4c7af2bbd 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -876,6 +876,6 @@ static void __exit exit_gdrom(void)
 
 module_init(init_gdrom);
 module_exit(exit_gdrom);
-MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
+MODULE_AUTHOR("Adrian McMenamin <adrianmcmenamin@gmail.com>");
 MODULE_DESCRIPTION("SEGA Dreamcast GD-ROM Driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c
index 7f36f73844a9..c393aecccbf4 100644
--- a/drivers/input/joystick/maplecontrol.c
+++ b/drivers/input/joystick/maplecontrol.c
@@ -15,7 +15,7 @@
 #include <linux/timer.h>
 #include <linux/maple.h>
 
-MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
+MODULE_AUTHOR("Adrian McMenamin <adrianmcmenamin@gmail.com>");
 MODULE_DESCRIPTION("SEGA Dreamcast controller driver");
 MODULE_LICENSE("GPL");
 
diff --git a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c
index 80a5181313e1..7531ff1b2008 100644
--- a/drivers/input/keyboard/maple_keyb.c
+++ b/drivers/input/keyboard/maple_keyb.c
@@ -19,7 +19,7 @@ static DEFINE_MUTEX(maple_keyb_mutex);
 
 #define NR_SCANCODES 256
 
-MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk");
+MODULE_AUTHOR("Adrian McMenamin <adrianmcmenamin@gmail.com");
 MODULE_DESCRIPTION("SEGA Dreamcast keyboard driver");
 MODULE_LICENSE("GPL");
 
diff --git a/drivers/input/mouse/maplemouse.c b/drivers/input/mouse/maplemouse.c
index c99f7e234219..93defe596691 100644
--- a/drivers/input/mouse/maplemouse.c
+++ b/drivers/input/mouse/maplemouse.c
@@ -15,7 +15,7 @@
 #include <linux/timer.h>
 #include <linux/maple.h>
 
-MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
+MODULE_AUTHOR("Adrian McMenamin <adrianmcmenamin@gmail.com>");
 MODULE_DESCRIPTION("SEGA Dreamcast mouse driver");
 MODULE_LICENSE("GPL");
 
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 9438c3a68ee9..ed262e2263d1 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -2,10 +2,10 @@
 /*
 *
 * Copyright Adrian McMenamin 2005, 2006, 2007
-* <adrian@mcmen.demon.co.uk>
+* <adrianmcmenamin@gmail.com>
 * Requires firmware (BSD licenced) available from:
-* http://linuxdc.cvs.sourceforge.net/linuxdc/linux-sh-dc/sound/oss/aica/firmware/
-* or the maintainer
+* https://www.alsa-project.org/files/pub/firmware/
+* (aica_firmware.bin)
 */
 
 #include <linux/init.h>
@@ -29,7 +29,7 @@
 #include <mach/sysasic.h>
 #include "aica.h"
 
-MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
+MODULE_AUTHOR("Adrian McMenamin <adrianmcmenamin@gmail.com>");
 MODULE_DESCRIPTION("Dreamcast AICA sound (pcm) driver");
 MODULE_LICENSE("GPL");
 MODULE_FIRMWARE("aica_firmware.bin");
diff --git a/sound/sh/aica.h b/sound/sh/aica.h
index 021b132e088e..75e25dbf58a8 100644
--- a/sound/sh/aica.h
+++ b/sound/sh/aica.h
@@ -3,7 +3,7 @@
  * Header file for ALSA driver for
  * Sega Dreamcast Yamaha AICA sound
  * Copyright Adrian McMenamin
- * <adrian@mcmen.demon.co.uk>
+ * <adrianmcmenamin@gmail.com>
  * 2006
  */
 
-- 
2.43.0


^ permalink raw reply related

* [PATCH] Input: cap11xx - remove duplicate dev_info print
From: Jun Yan @ 2026-03-29  5:22 UTC (permalink / raw)
  To: linux-kernel, linux-input; +Cc: dmitry.torokhov, Jun Yan

Remove the duplicated CAP11XX device detection log print
to avoid redundant kernel messages.

Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 drivers/input/keyboard/cap11xx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
index 0c17cbaa3d27..9c94ea047d64 100644
--- a/drivers/input/keyboard/cap11xx.c
+++ b/drivers/input/keyboard/cap11xx.c
@@ -534,9 +534,6 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client)
 	if (error < 0)
 		return error;
 
-	dev_info(dev, "CAP11XX detected, model %s, revision 0x%02x\n",
-			 id->name, rev);
-
 	priv->model = cap;
 
 	dev_info(dev, "CAP11XX device detected, model %s, revision 0x%02x\n",
-- 
2.53.0


^ permalink raw reply related

* [PATCH v2] Input: aiptek: validate raw macro indices before updating state
From: Pengpeng Hou @ 2026-03-29  0:17 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: andriy.shevchenko, kees, linux-input, linux-kernel, pengpeng
In-Reply-To: <20260323070311.42849-1-pengpeng@iscas.ac.cn>

aiptek_irq() derives macro key indices directly from tablet reports and
then uses them to index macroKeyEvents[]. Report types 4 and 5 also save
the derived value in aiptek->lastMacro and later use that state to
release the previous key.

Validate the raw macro index once before it enters that state machine, so
lastMacro only ever stores an in-range macro key. Keep direct bounds
checks for report type 6, which reads the macro number from the packet
body and uses it immediately.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
v2:
- validate the raw `macro` value before it enters `lastMacro`
- drop the redundant bounds checks on `lastMacro` itself

 drivers/input/tablet/aiptek.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 6df24cee3c9d..e0f64ed63543 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -658,6 +658,8 @@ static void aiptek_irq(struct urb *urb)
 		pck = (data[1] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0;
 
 		macro = dv && p && tip && !(data[3] & 1) ? (data[3] >> 1) : -1;
+		if (macro >= ARRAY_SIZE(macroKeyEvents))
+			macro = -1;
 		z = get_unaligned_le16(data + 4);
 
 		if (dv) {
@@ -700,6 +702,8 @@ static void aiptek_irq(struct urb *urb)
 		right = (data[1] & aiptek->curSetting.mouseButtonRight) != 0 ? 1 : 0;
 		middle = (data[1] & aiptek->curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
 		macro = dv && p && left && !(data[3] & 1) ? (data[3] >> 1) : 0;
+		if (macro >= ARRAY_SIZE(macroKeyEvents))
+			macro = -1;
 
 		if (dv) {
 		        /* If the selected tool changed, reset the old
@@ -737,11 +741,11 @@ static void aiptek_irq(struct urb *urb)
 	 */
 	else if (data[0] == 6) {
 		macro = get_unaligned_le16(data + 1);
-		if (macro > 0) {
+		if (macro > 0 && macro - 1 < ARRAY_SIZE(macroKeyEvents)) {
 			input_report_key(inputdev, macroKeyEvents[macro - 1],
 					 0);
 		}
-		if (macro < 25) {
+		if (macro + 1 < ARRAY_SIZE(macroKeyEvents)) {
 			input_report_key(inputdev, macroKeyEvents[macro + 1],
 					 0);
 		}
@@ -760,7 +764,8 @@ static void aiptek_irq(struct urb *urb)
 				aiptek->curSetting.toolMode;
 		}
 
-		input_report_key(inputdev, macroKeyEvents[macro], 1);
+		if (macro < ARRAY_SIZE(macroKeyEvents))
+			input_report_key(inputdev, macroKeyEvents[macro], 1);
 		input_report_abs(inputdev, ABS_MISC,
 				 1 | AIPTEK_REPORT_TOOL_UNKNOWN);
 		input_sync(inputdev);
-- 
2.50.1 (Apple Git-155)


^ permalink raw reply related

* [PATCH 2/2] MIPS/mtd: Handle READY GPIO in generic NAND platform data
From: Linus Walleij @ 2026-03-28 15:55 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Dmitry Torokhov, Bartosz Golaszewski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mips, linux-input, linux-gpio, linux-mtd, Linus Walleij
In-Reply-To: <20260328-mips-input-rb532-button-v1-0-98e201621501@kernel.org>

The callbacks into the MIPS RB532 platform to read the GPIO pin
indicating that the NAND chip is ready are oldschool and does
not assign GPIOs as properties to the NAND device.

Add a capability to the generic platform NAND chip driver to use
a GPIO line to detect if a NAND chip is ready and override the
platform-local drv_ready() callback with this check if the GPIO
is present.

This makes it possible to drop the legacy include header
<linux/gpio.h> from the RB532 devices.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 arch/mips/rb532/devices.c        | 36 +++++++++++++++++++++---------------
 drivers/mtd/nand/raw/plat_nand.c | 24 +++++++++++++++++++++++-
 2 files changed, 44 insertions(+), 16 deletions(-)

diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index 3f56d9feb73a..c3d8d96d0ef5 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -14,7 +14,6 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/platnand.h>
 #include <linux/mtd/mtd.h>
-#include <linux/gpio.h>
 #include <linux/gpio/machine.h>
 #include <linux/gpio/property.h>
 #include <linux/gpio_keys.h>
@@ -135,12 +134,6 @@ static struct platform_device cf_slot0 = {
 	.num_resources = ARRAY_SIZE(cf_slot0_res),
 };
 
-/* Resources and device for NAND */
-static int rb532_dev_ready(struct nand_chip *chip)
-{
-	return gpio_get_value(GPIO_RDY);
-}
-
 static void rb532_cmd_ctrl(struct nand_chip *chip, int cmd, unsigned int ctrl)
 {
 	unsigned char orbits, nandbits;
@@ -166,16 +159,23 @@ static struct resource nand_slot0_res[] = {
 };
 
 static struct platform_nand_data rb532_nand_data = {
-	.ctrl.dev_ready = rb532_dev_ready,
 	.ctrl.cmd_ctrl	= rb532_cmd_ctrl,
 };
 
-static struct platform_device nand_slot0 = {
-	.name = "gen_nand",
-	.id = -1,
-	.resource = nand_slot0_res,
-	.num_resources = ARRAY_SIZE(nand_slot0_res),
-	.dev.platform_data = &rb532_nand_data,
+static const struct property_entry nand0_properties[] = {
+	PROPERTY_ENTRY_GPIO("ready-gpios", &rb532_gpio0_node,
+			    GPIO_RDY, GPIO_ACTIVE_HIGH),
+	{ }
+};
+
+static const struct platform_device_info nand0_info  __initconst = {
+	.name		= "gen_nand",
+	.id		= PLATFORM_DEVID_NONE,
+	.res		= nand_slot0_res,
+	.num_res	= ARRAY_SIZE(nand_slot0_res),
+	.data		= &rb532_nand_data,
+	.size_data	= sizeof(struct platform_nand_data),
+	.properties	= nand0_properties,
 };
 
 static struct mtd_partition rb532_partition_info[] = {
@@ -234,7 +234,6 @@ static struct platform_device rb532_uart = {
 
 static struct platform_device *rb532_devs[] = {
 	&korina_dev0,
-	&nand_slot0,
 	&cf_slot0,
 	&rb532_led,
 	&rb532_uart,
@@ -321,6 +320,13 @@ static int __init plat_setup_devices(void)
 	 */
 	software_node_register(&rb532_gpio0_node);
 
+	pd = platform_device_register_full(&nand0_info);
+	ret = PTR_ERR_OR_ZERO(pd);
+	if (ret) {
+		pr_err("failed to create NAND slot0 device: %d\n", ret);
+		return ret;
+	}
+
 	pd = platform_device_register_full(&rb532_button_info);
 	ret = PTR_ERR_OR_ZERO(pd);
 	if (ret) {
diff --git a/drivers/mtd/nand/raw/plat_nand.c b/drivers/mtd/nand/raw/plat_nand.c
index 0bcd455328ef..fe31551bcf5f 100644
--- a/drivers/mtd/nand/raw/plat_nand.c
+++ b/drivers/mtd/nand/raw/plat_nand.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/err.h>
+#include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -17,6 +18,7 @@ struct plat_nand_data {
 	struct nand_controller	controller;
 	struct nand_chip	chip;
 	void __iomem		*io_base;
+	struct gpio_desc	*ready_gpio;
 };
 
 static int plat_nand_attach_chip(struct nand_chip *chip)
@@ -32,6 +34,14 @@ static const struct nand_controller_ops plat_nand_ops = {
 	.attach_chip = plat_nand_attach_chip,
 };
 
+/* Resources and device for NAND */
+static int plat_nand_gpio_dev_ready(struct nand_chip *chip)
+{
+	struct plat_nand_data *data = nand_get_controller_data(chip);
+
+	return gpiod_get_value(data->ready_gpio);
+}
+
 /*
  * Probe for the NAND device.
  */
@@ -41,6 +51,7 @@ static int plat_nand_probe(struct platform_device *pdev)
 	struct plat_nand_data *data;
 	struct mtd_info *mtd;
 	const char **part_types;
+	struct nand_chip *chip;
 	int err = 0;
 
 	if (!pdata) {
@@ -59,9 +70,17 @@ static int plat_nand_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENOMEM;
 
+	data->ready_gpio = devm_gpiod_get_optional(&pdev->dev, "ready",
+						   GPIOD_IN);
+	if (IS_ERR(data->ready_gpio))
+		return dev_err_probe(&pdev->dev, PTR_ERR(data->ready_gpio),
+				     "could not get READY GPIO\n");
+
 	data->controller.ops = &plat_nand_ops;
 	nand_controller_init(&data->controller);
 	data->chip.controller = &data->controller;
+	chip = &data->chip;
+	nand_set_controller_data(chip, data);
 
 	data->io_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(data->io_base))
@@ -74,7 +93,10 @@ static int plat_nand_probe(struct platform_device *pdev)
 	data->chip.legacy.IO_ADDR_R = data->io_base;
 	data->chip.legacy.IO_ADDR_W = data->io_base;
 	data->chip.legacy.cmd_ctrl = pdata->ctrl.cmd_ctrl;
-	data->chip.legacy.dev_ready = pdata->ctrl.dev_ready;
+	if (data->ready_gpio)
+		data->chip.legacy.dev_ready = plat_nand_gpio_dev_ready;
+	else
+		data->chip.legacy.dev_ready = pdata->ctrl.dev_ready;
 	data->chip.legacy.select_chip = pdata->ctrl.select_chip;
 	data->chip.legacy.write_buf = pdata->ctrl.write_buf;
 	data->chip.legacy.read_buf = pdata->ctrl.read_buf;

-- 
2.53.0


^ permalink raw reply related

* [PATCH 1/2] MIPS/input: Move RB532 button to GPIO descriptors
From: Linus Walleij @ 2026-03-28 15:55 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Dmitry Torokhov, Bartosz Golaszewski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mips, linux-input, linux-gpio, linux-mtd, Linus Walleij
In-Reply-To: <20260328-mips-input-rb532-button-v1-0-98e201621501@kernel.org>

Convert the Mikrotik RouterBoard RB532 to use GPIO descriptors
by defining a software node for the GPIO chip, then register
the button platform device with full info passing the GPIO
as a device property.

This can be used as a base to move more of the RB532 devices
over to passing GPIOs using device properties.

Use the GPIO_ACTIVE_LOW flag and drop the inversion in the
rb532_button_pressed() function.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 arch/mips/rb532/devices.c         | 47 +++++++++++++++++++++++++++++++++------
 drivers/input/misc/rb532_button.c | 35 ++++++++++++++++++++++++-----
 2 files changed, 69 insertions(+), 13 deletions(-)

diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index 4f027efbf27b..3f56d9feb73a 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -16,8 +16,10 @@
 #include <linux/mtd/mtd.h>
 #include <linux/gpio.h>
 #include <linux/gpio/machine.h>
+#include <linux/gpio/property.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
+#include <linux/property.h>
 #include <linux/serial_8250.h>
 
 #include <asm/bootinfo.h>
@@ -38,6 +40,10 @@ extern unsigned int idt_cpu_freq;
 
 static struct mpmc_device dev3;
 
+static const struct software_node rb532_gpio0_node = {
+	.name = "gpio0",
+};
+
 void set_latch_u5(unsigned char or_mask, unsigned char nand_mask)
 {
 	unsigned long flags;
@@ -189,11 +195,6 @@ static struct platform_device rb532_led = {
 	.id = -1,
 };
 
-static struct platform_device rb532_button = {
-	.name	= "rb532-button",
-	.id	= -1,
-};
-
 static struct resource rb532_wdt_res[] = {
 	{
 		.name = "rb532_wdt_res",
@@ -236,11 +237,23 @@ static struct platform_device *rb532_devs[] = {
 	&nand_slot0,
 	&cf_slot0,
 	&rb532_led,
-	&rb532_button,
 	&rb532_uart,
 	&rb532_wdt
 };
 
+static const struct property_entry rb532_button_properties[] = {
+	PROPERTY_ENTRY_GPIO("button-gpios", &rb532_gpio0_node,
+			    GPIO_BTN_S1, GPIO_ACTIVE_LOW),
+	{ }
+};
+
+static const struct platform_device_info rb532_button_info  __initconst = {
+	.name		= "rb532-button",
+	.id		= PLATFORM_DEVID_NONE,
+	.properties	= rb532_button_properties,
+};
+
+
 /* NAND definitions */
 #define NAND_CHIP_DELAY 25
 
@@ -267,6 +280,9 @@ static void __init rb532_nand_setup(void)
 
 static int __init plat_setup_devices(void)
 {
+	struct platform_device *pd;
+	int ret;
+
 	/* Look for the CF card reader */
 	if (!readl(IDT434_REG_BASE + DEV1MASK))
 		rb532_devs[2] = NULL;	/* disable cf_slot0 at index 2 */
@@ -295,7 +311,24 @@ static int __init plat_setup_devices(void)
 	rb532_uart_res[0].uartclk = idt_cpu_freq;
 
 	gpiod_add_lookup_table(&cf_slot0_gpio_table);
-	return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs));
+	ret = platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs));
+	if (ret)
+		return ret;
+
+	/*
+	 * Stack devices using full info and properties here, after we
+	 * register the node for the GPIO chip.
+	 */
+	software_node_register(&rb532_gpio0_node);
+
+	pd = platform_device_register_full(&rb532_button_info);
+	ret = PTR_ERR_OR_ZERO(pd);
+	if (ret) {
+		pr_err("failed to create RB532 button device: %d\n", ret);
+		return ret;
+	}
+
+	return 0;
 }
 
 #ifdef CONFIG_NET
diff --git a/drivers/input/misc/rb532_button.c b/drivers/input/misc/rb532_button.c
index 190a80e1e2c1..40173bf7a235 100644
--- a/drivers/input/misc/rb532_button.c
+++ b/drivers/input/misc/rb532_button.c
@@ -8,7 +8,7 @@
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include <asm/mach-rc32434/gpio.h>
 #include <asm/mach-rc32434/rb.h>
@@ -18,6 +18,14 @@
 #define RB532_BTN_RATE 100 /* msec */
 #define RB532_BTN_KSYM BTN_0
 
+/**
+ * struct rb532_button - RB532 button information
+ * @gpio: GPIO connected to the button
+ */
+struct rb532_button {
+	struct gpio_desc	*gpio;
+};
+
 /* The S1 button state is provided by GPIO pin 1. But as this
  * pin is also used for uart input as alternate function, the
  * operational modes must be switched first:
@@ -31,35 +39,48 @@
  * The GPIO value occurs to be inverted, so pin high means
  * button is not pressed.
  */
-static bool rb532_button_pressed(void)
+static bool rb532_button_pressed(struct rb532_button *button)
 {
 	int val;
 
 	set_latch_u5(0, LO_FOFF);
-	gpio_direction_input(GPIO_BTN_S1);
+	gpiod_direction_input(button->gpio);
 
-	val = gpio_get_value(GPIO_BTN_S1);
+	val = gpiod_get_value(button->gpio);
 
 	rb532_gpio_set_func(GPIO_BTN_S1);
 	set_latch_u5(LO_FOFF, 0);
 
-	return !val;
+	return val;
 }
 
 static void rb532_button_poll(struct input_dev *input)
 {
-	input_report_key(input, RB532_BTN_KSYM, rb532_button_pressed());
+	struct rb532_button *button = input_get_drvdata(input);
+
+	input_report_key(input, RB532_BTN_KSYM, rb532_button_pressed(button));
 	input_sync(input);
 }
 
 static int rb532_button_probe(struct platform_device *pdev)
 {
+	struct rb532_button *button;
 	struct input_dev *input;
 	int error;
 
+	button = devm_kzalloc(&pdev->dev, sizeof(*button), GFP_KERNEL);
+	if (!button)
+		return -ENOMEM;
+
+	button->gpio = devm_gpiod_get(&pdev->dev, "button", GPIOD_IN);
+	if (IS_ERR(button->gpio))
+		return dev_err_probe(&pdev->dev, PTR_ERR(button->gpio),
+				     "error getting button GPIO\n");
+
 	input = devm_input_allocate_device(&pdev->dev);
 	if (!input)
 		return -ENOMEM;
+	input_set_drvdata(input, button);
 
 	input->name = "rb532 button";
 	input->phys = "rb532/button0";
@@ -77,6 +98,8 @@ static int rb532_button_probe(struct platform_device *pdev)
 	if (error)
 		return error;
 
+	platform_set_drvdata(pdev, button);
+
 	return 0;
 }
 

-- 
2.53.0


^ permalink raw reply related

* [PATCH 0/2] MIPS RB532 GPIO descriptor conversion
From: Linus Walleij @ 2026-03-28 15:55 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Dmitry Torokhov, Bartosz Golaszewski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mips, linux-input, linux-gpio, linux-mtd, Linus Walleij

This moves the MIPS Mikrotik RouterBoard RB532 over to using
GPIO descriptors by augmenting the two remaining drivers using
GPIOs to use software nodes and device properties.

This is part of the pull to get rid of the legacy GPIO API
inside the kernel.

It would be nice if someone can test of this actually works,
I've only compile-tested it.

If we can agree on this method to move forward with this machine
it would be nice if the MIPS maintainer could merge the end
result with ACKs from the input and MTD maintainers.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Linus Walleij (2):
      MIPS/input: Move RB532 button to GPIO descriptors
      MIPS/mtd: Handle READY GPIO in generic NAND platform data

 arch/mips/rb532/devices.c         | 83 ++++++++++++++++++++++++++++-----------
 drivers/input/misc/rb532_button.c | 35 ++++++++++++++---
 drivers/mtd/nand/raw/plat_nand.c  | 24 ++++++++++-
 3 files changed, 113 insertions(+), 29 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260327-mips-input-rb532-button-39e44085a2f9

Best regards,
-- 
Linus Walleij <linusw@kernel.org>


^ permalink raw reply

* Re: [PATCH] Input: add keycodes for contextual AI usages (HUTRR119)
From: Dmitry Torokhov @ 2026-03-27 16:17 UTC (permalink / raw)
  To: Akshai Murari; +Cc: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kernel
In-Reply-To: <20260327065446.3467352-1-akshaim@google.com>

On Fri, Mar 27, 2026 at 06:54:45AM +0000, Akshai Murari wrote:
> HUTRR119 introduces new usages for keys intended to invoke AI agents
> based on the current context. These are useful with the increasing
> number of operating systems with integrated Large Language Models
> 
> Add new key definitions for KEY_ACTION_ON_SELECTION,
> KEY_CONTEXTUAL_INSERT and KEY_CONTEXTUAL_QUERY
> 
> Signed-off-by: Akshai Murari <akshaim@google.com>

Jiri, Benjamin, how do you want to merge this?

Just in case:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] HID: Kysona: Add support for VXE Dragonfly R1 Pro
From: Jiri Kosina @ 2026-03-27 14:51 UTC (permalink / raw)
  To: Lode Willems; +Cc: linux-input, bentiss, linux-kernel, Dominykas Svetikas
In-Reply-To: <20260324204306.694760-1-me@lodewillems.com>

On Tue, 24 Mar 2026, Lode Willems wrote:

> Apparently this same protocol is used by more mice from different brands.
> 
> This patch adds support for the VXE Dragonfly R1 Pro.
> 
> Tested-by: Dominykas Svetikas <dominykas@svetikas.lt>
> Signed-off-by: Lode Willems <me@lodewillems.com>

Applied to hid.git#for-7.0/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
From: Jiri Kosina @ 2026-03-27 13:12 UTC (permalink / raw)
  To: Maximilian Pezzullo
  Cc: Basavaraj Natikar, Benjamin Tissoires, linux-input, linux-kernel,
	Casey Croy
In-Reply-To: <20260304-amd-sfh-suppress-eopnotsupp-err-v1-1-20214ca6a2f7@gmail.com>

On Wed, 4 Mar 2026, Maximilian Pezzullo via B4 Relay wrote:

> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> 
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
> 
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
> 
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>

Applied to hid.git#for-7.0/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
From: Basavaraj Natikar @ 2026-03-27 12:47 UTC (permalink / raw)
  To: maximilianpezzullo, Basavaraj Natikar, Jiri Kosina,
	Benjamin Tissoires
  Cc: linux-input, linux-kernel, Casey Croy
In-Reply-To: <20260304-amd-sfh-suppress-eopnotsupp-err-v1-1-20214ca6a2f7@gmail.com>


On 3/4/2026 1:55 PM, Maximilian Pezzullo via B4 Relay wrote:
> [You don't often get email from devnull+maximilianpezzullo.gmail.com@kernel.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
>
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
>
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
>
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> ---
>   drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 1d9f955573aa..4b81cebdc335 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
>          rc = amd_sfh_hid_client_init(mp2);
>          if (rc) {
>                  amd_sfh_clear_intr(mp2);
> -               dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
> +               if (rc != -EOPNOTSUPP)
> +                       dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
>                  return;
>          }

Looks good to me.

Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>

Thanks,
--
Basavaraj

>
>
> ---
> base-commit: af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08
> change-id: 20260304-amd-sfh-suppress-eopnotsupp-err-0be59878e2fe
>
> Best regards,
> --
> Maximilian Pezzullo <maximilianpezzullo@gmail.com>
>
>


^ permalink raw reply

* Re: [PATCH] Hid: Intel-thc-hid: Intel-quickspi: Improve power management for touch devices
From: Jiri Kosina @ 2026-03-27 12:32 UTC (permalink / raw)
  To: Even Xu; +Cc: bentiss, srinivas.pandruvada, linux-input, linux-kernel,
	Rui Zhang
In-Reply-To: <20260318032547.839686-1-even.xu@intel.com>

On Wed, 18 Mar 2026, Even Xu wrote:

> Enhance power management with two key improvements:
> 1. Hibernate support: Send POWER_OFF command when entering hibernate
>    mode.
> 2. Conditional sleep commands: Only send POWER_SLEEP/POWER_ON commands
>    during system suspend/resume when the touch device is not configured
>    as a wake source, preserving Wake-on-Touch (WoT) functionality. This
>    ensures proper power states while maintaining expected wake behavior.
> 
> Signed-off-by: Even Xu <even.xu@intel.com>
> Tested-by: Rui Zhang <rui1.zhang@intel.com>

Applied to hid.git#for-7.1/intel-thc, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] Hid: Intel-thc-hid: Intel-thc: Add more frequency support for SPI
From: Jiri Kosina @ 2026-03-27 12:32 UTC (permalink / raw)
  To: Even Xu; +Cc: bentiss, srinivas.pandruvada, linux-input, linux-kernel,
	Rui Zhang
In-Reply-To: <20260318032204.835621-1-even.xu@intel.com>

On Wed, 18 Mar 2026, Even Xu wrote:

> The Nova Lake platform enhances THC with half divider capability for
> clock division, allowing more granular frequency control for the THC
> SPI port.
> 
> Supported frequencies include 50MHz (125MHz/2.5), 35MHz (125MHz/3.5),
> and 10MHz (125MHz/8/1.5).
> 
> Signed-off-by: Even Xu <even.xu@intel.com>
> Tested-by: Rui Zhang <rui1.zhang@intel.com>

Applied to hid.git#for-7.1/intel-thc. Once again -- if you could follow 
the standard shortlog convention with all-uppercase "HID: " prefix in the 
shortlog, it'd be appreciated.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
From: Jiri Kosina @ 2026-03-27 12:26 UTC (permalink / raw)
  To: Maximilian Pezzullo, Basavaraj Natikar
  Cc: Benjamin Tissoires, linux-input, linux-kernel, Casey Croy
In-Reply-To: <20260304-amd-sfh-suppress-eopnotsupp-err-v1-1-20214ca6a2f7@gmail.com>

On Wed, 4 Mar 2026, Maximilian Pezzullo via B4 Relay wrote:

> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> 
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
> 
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
> 
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>

Basavaraj Natikar, could we please get your Ack on this? Thanks.

> ---
>  drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 1d9f955573aa..4b81cebdc335 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
>  	rc = amd_sfh_hid_client_init(mp2);
>  	if (rc) {
>  		amd_sfh_clear_intr(mp2);
> -		dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
> +		if (rc != -EOPNOTSUPP)
> +			dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
>  		return;
>  	}
>  
> 

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH 1/2] HID: core: factor out hid_parse_collections()
From: Jiri Kosina @ 2026-03-27 11:09 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Benjamin Tissoires, linux-input, linux-kernel
In-Reply-To: <20260326062539.750272-1-dmitry.torokhov@gmail.com>

On Wed, 25 Mar 2026, Dmitry Torokhov wrote:

> In preparation to making use of __free(...) cleanup facilities to
> clean up temporary buffers, factor out code parsing collections into
> a separate function to make the code simpler.

Both applied to hid.git#for-7.1/core-v2, thanks Dmitry!

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: hid-lenovo-go: fix LEDS dependencies
From: Jiri Kosina @ 2026-03-27 10:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Benjamin Tissoires, Derek J. Clark, Mark Pearson,
	Mario Limonciello, Ethan Tidmore, Arnd Bergmann, Aditya Garg,
	Jonathan Denose, Geert Uytterhoeven, linux-input, linux-kernel
In-Reply-To: <20260324192045.2895560-1-arnd@kernel.org>

On Tue, 24 Mar 2026, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to
> 'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build
> failure when NEW_LEDS itself it disabled:
> 
> WARNING: unmet direct dependencies detected for LEDS_CLASS
>   Depends on [n]: NEW_LEDS [=n]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
> 
> WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
>   Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=m]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
> ERROR: modpost: "led_set_brightness_nopm" [drivers/leds/led-class.ko] undefined!
> ERROR: modpost: "led_set_brightness" [drivers/leds/led-class.ko] undefined!
> ERROR: modpost: "led_get_color_name" [drivers/leds/led-class-multicolor.ko] undefined!
> ERROR: modpost: "led_set_brightness" [drivers/leds/led-class-multicolor.ko] undefined!
> 
> Device drivers generally should not select other subsystems like this, as
> that tends to cause dependency problems including loops in the dependency
> graph.
> 
> Change these two and the older hid-lenovo driver to behave the same way as all
> other HID drivers and use 'depends on LEDS_CLASS' or 'depends on LEDS_CLASS_MULTICOLOR'
> instead, which itself has NEW_LEDS and LEDS_CLASS as dependencies.
> 
> Fixes: a23f3497bf20 ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
> Fixes: d69ccfcbc955 ("HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Good catch, that escaped my attention during review. Applied to 
hid.git#for-7.1/lenovo-v2, thanks Arnd!

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2] HID: quirks: add HID_QUIRK_ALWAYS_POLL for 8BitDo Pro 3
From: Jiri Kosina @ 2026-03-27 10:51 UTC (permalink / raw)
  To: leo vriska; +Cc: linux-input, Benjamin Tissoires, linux-kernel
In-Reply-To: <20260304183727.538405-1-leo@60228.dev>

On Wed, 4 Mar 2026, leo vriska wrote:

> According to a mailing list report [1], this controller's predecessor
> has the same issue. However, it uses the xpad driver instead of HID, so
> this quirk wouldn't apply.
> 
> [1]: https://lore.kernel.org/linux-input/unufo3$det$1@ciao.gmane.io/
> 
> Signed-off-by: leo vriska <leo@60228.dev>
> ---
>  drivers/hid/hid-ids.h    | 3 +++
>  drivers/hid/hid-quirks.c | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 4ab7640b119a..8c1f41a9e5f6 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -22,6 +22,9 @@
>  #define USB_DEVICE_ID_3M2256		0x0502
>  #define USB_DEVICE_ID_3M3266		0x0506
>  
> +#define USB_VENDOR_ID_8BITDO		0x2dc8
> +#define USB_DEVICE_ID_8BITDO_PRO_3	0x6009
> +
>  #define USB_VENDOR_ID_A4TECH		0x09da
>  #define USB_DEVICE_ID_A4TECH_WCP32PU	0x0006
>  #define USB_DEVICE_ID_A4TECH_X5_005D	0x000a
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index 3217e436c052..f6be3ffee023 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -25,6 +25,7 @@
>   */
>  
>  static const struct hid_device_id hid_quirks[] = {
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_8BITDO, USB_DEVICE_ID_8BITDO_PRO_3), HID_QUIRK_ALWAYS_POLL },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },

Applied to hid.git#for-7.0/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: sony: add support for more instruments
From: Jiri Kosina @ 2026-03-27 10:49 UTC (permalink / raw)
  To: Rosalie Wanders
  Cc: Benjamin Tissoires, Sanjay Govind, Brenton Simpson, linux-input,
	linux-kernel
In-Reply-To: <20260228060552.53741-2-rosalie@mailbox.org>

On Sat, 28 Feb 2026, Rosalie Wanders wrote:

> This patch adds support for the following instruments:
> 
> * Rock Band 1/2/3 Wii/PS3 instruments
> * Rock Band 3 PS3 Pro instruments
> * DJ Hero Turntable
> 
> Wii and PS3 instruments are the same besides the vendor and product ID.
> 
> This patch also fixes the mappings for the existing Guitar Hero
> instruments.
> 
> Co-developed-by: Sanjay Govind <sanjay.govind9@gmail.com>
> Signed-off-by: Sanjay Govind <sanjay.govind9@gmail.com>
> Co-developed-by: Brenton Simpson <appsforartists@google.com>
> Signed-off-by: Brenton Simpson <appsforartists@google.com>
> Signed-off-by: Rosalie Wanders <rosalie@mailbox.org>

Applied to hid.git#for-7.1/sony, thanks!

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] hid: usbhid: fix deadlock in hid_post_reset()
From: Jiri Kosina @ 2026-03-27 10:34 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: bentiss, linux-input, linux-usb
In-Reply-To: <20260324142507.74873-1-oneukum@suse.com>

On Tue, 24 Mar 2026, Oliver Neukum wrote:

> You can build a USB device that includes a HID component
> and a storage or UAS component. The components can be reset
> only together. That means that hid_pre_reset() and hid_post_reset()
> are in the block IO error handling. Hence no memory allocation
> used in them may do block IO because the IO can deadlock
> on the mutex held while resetting a device and calling the
> interface drivers.
> Use GFP_NOIO for all allocations in them.
> 
> Fixes: dc3c78e434690 ("HID: usbhid: Check HID report descriptor contents after device reset")
> Signed-off-by: Oliver Neukum <oneukum@suse.com>

Thanks Oliver.

Did you find this just by code inspection, or was this reported with a 
real device?

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH] HID: roccat: fix use-after-free in roccat_report_event
From: Jiri Kosina @ 2026-03-27 10:28 UTC (permalink / raw)
  To: FirstName LastName
  Cc: Stefan Achatz, Benjamin Tissoires, linux-input, linux-kernel
In-Reply-To: <20260323161107.3478633-1-bsevens@google.com>

On Mon, 23 Mar 2026, FirstName LastName wrote:

> From: Benoît Sevens <bsevens@google.com>
> 
> roccat_report_event() iterates over the device->readers list without
> holding the readers_lock. This allows a concurrent roccat_release() to
> remove and free a reader while it's still being accessed, leading to a
> use-after-free.
> 
> Protect the readers list traversal with the readers_lock mutex.
> 
> Signed-off-by: Benoît Sevens <bsevens@google.com>
> ---
>  drivers/hid/hid-roccat.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c
> index fd0ea52f7cba..d6fff53d4ee7 100644
> --- a/drivers/hid/hid-roccat.c
> +++ b/drivers/hid/hid-roccat.c
> @@ -257,6 +257,7 @@ int roccat_report_event(int minor, u8 const *data)
>  	if (!new_value)
>  		return -ENOMEM;
>  
> +	mutex_lock(&device->readers_lock);
>  	mutex_lock(&device->cbuf_lock);
>  
>  	report = &device->cbuf[device->cbuf_end];
> @@ -279,6 +280,7 @@ int roccat_report_event(int minor, u8 const *data)
>  	}
>  
>  	mutex_unlock(&device->cbuf_lock);
> +	mutex_unlock(&device->readers_lock);

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* [PATCH] input: fix missing newline in pr_err message
From: Haoyu Lu @ 2026-03-27  7:53 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, haoyu.lu

From: "haoyu.lu" <hechushiguitu666@gmail.com>

---
 drivers/input/input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index 7b7490a1fbc6..092c92380911 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -2730,7 +2730,7 @@ static int __init input_init(void)
 	err = register_chrdev_region(MKDEV(INPUT_MAJOR, 0),
 				     INPUT_MAX_CHAR_DEVICES, "input");
 	if (err) {
-		pr_err("unable to register char major %d", INPUT_MAJOR);
+		pr_err("unable to register char major %d\n", INPUT_MAJOR);
 		goto fail2;
 	}
 
-- 
2.53.0.windows.1


^ permalink raw reply related

* [PATCH] Input: add keycodes for contextual AI usages (HUTRR119)
From: Akshai Murari @ 2026-03-27  6:54 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov
  Cc: Akshai Murari, linux-input, linux-kernel

HUTRR119 introduces new usages for keys intended to invoke AI agents
based on the current context. These are useful with the increasing
number of operating systems with integrated Large Language Models

Add new key definitions for KEY_ACTION_ON_SELECTION,
KEY_CONTEXTUAL_INSERT and KEY_CONTEXTUAL_QUERY

Signed-off-by: Akshai Murari <akshaim@google.com>
---
 drivers/hid/hid-debug.c                | 6 ++++++
 drivers/hid/hid-input.c                | 3 +++
 include/uapi/linux/input-event-codes.h | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index f20dc46fd8eb..f44e6e708404 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -990,6 +990,9 @@ static const struct hid_usage_entry hid_usage_table[] = {
 		{ 0x0c, 0x01c9, "ALContactSync" },
 		{ 0x0c, 0x01ca, "ALNavigation" },
 		{ 0x0c, 0x01cb, "ALContextawareDesktopAssistant" },
+		{ 0x0c, 0x01cc, "ALActionOnSelection" },
+		{ 0x0c, 0x01cd, "ALContextualInsertion" },
+		{ 0x0c, 0x01ce, "ALContextualQuery" },
 		{ 0x0c, 0x0200, "GenericGUIApplicationControls" },
 		{ 0x0c, 0x0201, "ACNew" },
 		{ 0x0c, 0x0202, "ACOpen" },
@@ -3375,6 +3378,9 @@ static const char *keys[KEY_MAX + 1] = {
 	[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
 	[KEY_BRIGHTNESS_MAX] = "BrightnessMax",
 	[KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
+	[KEY_ACTION_ON_SELECTION] = "ActionOnSelection",
+	[KEY_CONTEXTUAL_INSERT] = "ContextualInsert",
+	[KEY_CONTEXTUAL_QUERY] = "ContextualQuery",
 	[KEY_KBDINPUTASSIST_PREV] = "KbdInputAssistPrev",
 	[KEY_KBDINPUTASSIST_NEXT] = "KbdInputAssistNext",
 	[KEY_KBDINPUTASSIST_PREVGROUP] = "KbdInputAssistPrevGroup",
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9475b7e9da43..e824c793f669 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1227,6 +1227,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 		case 0x1bc: map_key_clear(KEY_MESSENGER);	break;
 		case 0x1bd: map_key_clear(KEY_INFO);		break;
 		case 0x1cb: map_key_clear(KEY_ASSISTANT);	break;
+		case 0x1cc: map_key_clear(KEY_ACTION_ON_SELECTION);	break;
+		case 0x1cd: map_key_clear(KEY_CONTEXTUAL_INSERT);	break;
+		case 0x1ce: map_key_clear(KEY_CONTEXTUAL_QUERY);	break;
 		case 0x201: map_key_clear(KEY_NEW);		break;
 		case 0x202: map_key_clear(KEY_OPEN);		break;
 		case 0x203: map_key_clear(KEY_CLOSE);		break;
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 4bdb6a165987..3528168f7c6d 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -643,6 +643,10 @@
 #define KEY_EPRIVACY_SCREEN_ON		0x252
 #define KEY_EPRIVACY_SCREEN_OFF		0x253
 
+#define KEY_ACTION_ON_SELECTION		0x254	/* AL Action on Selection (HUTRR119) */
+#define KEY_CONTEXTUAL_INSERT		0x255	/* AL Contextual Insertion (HUTRR119) */
+#define KEY_CONTEXTUAL_QUERY		0x256	/* AL Contextual Query (HUTRR119) */
+
 #define KEY_KBDINPUTASSIST_PREV		0x260
 #define KEY_KBDINPUTASSIST_NEXT		0x261
 #define KEY_KBDINPUTASSIST_PREVGROUP		0x262
-- 
2.53.0.1018.g2bb0e51243-goog


^ permalink raw reply related

* Re: [PATCH 3/3] Input: snvs_pwrkey - report press event in interrupt handler
From: Frank Li @ 2026-03-26 19:57 UTC (permalink / raw)
  To: Joy Zou
  Cc: Dmitry Torokhov, Peng Fan, Jacky Bai, Ye Li, imx, linux-input,
	linux-kernel
In-Reply-To: <20260326-pwrkey-cleanup-v1-3-d85d7c0bf275@nxp.com>

On Thu, Mar 26, 2026 at 06:39:40PM +0800, Joy Zou wrote:
> On some boards such as i.MX8MQ-EVK, the PCIe driver may take up to
> 200ms to restore the PCIe link during the no_irq resume phase. This
> causes key press events to be lost because the key may be released
> before the timer starts running, as interrupts are disabled during
> this 200ms window.

if irq disable, how imx_snvs_pwrkey_interrupt get run?

Frank
>
> Report key press events directly in interrupt handler to prevent event
> loss during system suspend.
>
> Signed-off-by: Joy Zou <joy.zou@nxp.com>
> ---
>  drivers/input/keyboard/snvs_pwrkey.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
> index bab3ab57fdac77256be75a080773ea99372ec9c7..b557c1618d7369e872c6ce708a7b3017264ee385 100644
> --- a/drivers/input/keyboard/snvs_pwrkey.c
> +++ b/drivers/input/keyboard/snvs_pwrkey.c
> @@ -78,6 +78,16 @@ static irqreturn_t imx_snvs_pwrkey_interrupt(int irq, void *dev_id)
>
>  	pm_wakeup_event(input->dev.parent, 0);
>
> +	/*
> +	 * Report key press events directly in interrupt handler to prevent event
> +	 * loss during system suspend.
> +	 */
> +	if (pdev->dev.power.is_suspended) {
> +		pdata->keystate = 1;
> +		input_report_key(input, pdata->keycode, 1);
> +		input_sync(input);
> +	}
> +
>  	regmap_read(pdata->snvs, SNVS_LPSR_REG, &lp_status);
>  	if (lp_status & SNVS_LPSR_SPO) {
>  		if (pdata->minor_rev == 0) {
>
> --
> 2.37.1
>

^ permalink raw reply

* Re: [PATCH 2/3] Input: snvs_pwrkey - use local device pointer avoid reference platform_device pointer every time
From: Frank Li @ 2026-03-26 19:55 UTC (permalink / raw)
  To: Joy Zou
  Cc: Dmitry Torokhov, Peng Fan, Jacky Bai, Ye Li, imx, linux-input,
	linux-kernel
In-Reply-To: <20260326-pwrkey-cleanup-v1-2-d85d7c0bf275@nxp.com>

On Thu, Mar 26, 2026 at 06:39:39PM +0800, Joy Zou wrote:
> Make use of local struct device pointer to not dereference the
> platform_device pointer every time.


Input: snvs_pwrkey - use local device pointer to simple code

Use local struct device pointer to avoid reference the platform_device
pointer every time.

No functional change.

Frank

>
> Signed-off-by: Joy Zou <joy.zou@nxp.com>
> ---
>  drivers/input/keyboard/snvs_pwrkey.c | 41 ++++++++++++++++++------------------
>  1 file changed, 21 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
> index 836ab94c160615f4b0f645d9b9f85d54638c2624..bab3ab57fdac77256be75a080773ea99372ec9c7 100644
> --- a/drivers/input/keyboard/snvs_pwrkey.c
> +++ b/drivers/input/keyboard/snvs_pwrkey.c
> @@ -112,6 +112,7 @@ static void imx_snvs_pwrkey_act(void *pdata)
>
>  static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
>  {
> +	struct device *dev = &pdev->dev;
>  	struct pwrkey_drv_data *pdata;
>  	struct input_dev *input;
>  	struct device_node *np;
> @@ -122,33 +123,33 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
>  	u32 vid;
>
>  	/* Get SNVS register Page */
> -	np = pdev->dev.of_node;
> +	np = dev->of_node;
>  	if (!np)
> -		return dev_err_probe(&pdev->dev, -ENODEV, "Device tree node not found\n");
> +		return dev_err_probe(dev, -ENODEV, "Device tree node not found\n");
>
> -	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> +	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>  	if (!pdata)
>  		return -ENOMEM;
>
>  	pdata->snvs = syscon_regmap_lookup_by_phandle(np, "regmap");
>  	if (IS_ERR(pdata->snvs))
> -		return dev_err_probe(&pdev->dev, PTR_ERR(pdata->snvs), "Can't get snvs syscon\n");
> +		return dev_err_probe(dev, PTR_ERR(pdata->snvs), "Can't get snvs syscon\n");
>
>  	if (of_property_read_u32(np, "linux,keycode", &pdata->keycode)) {
>  		pdata->keycode = KEY_POWER;
> -		dev_warn(&pdev->dev, "KEY_POWER without setting in dts\n");
> +		dev_warn(dev, "KEY_POWER without setting in dts\n");
>  	}
>
> -	clk = devm_clk_get_optional_enabled(&pdev->dev, NULL);
> +	clk = devm_clk_get_optional_enabled(dev, NULL);
>  	if (IS_ERR(clk))
> -		return dev_err_probe(&pdev->dev, PTR_ERR(clk),
> +		return dev_err_probe(dev, PTR_ERR(clk),
>  				     "Failed to get snvs clock (%pe)\n", clk);
>
>  	pdata->wakeup = of_property_read_bool(np, "wakeup-source");
>
>  	pdata->irq = platform_get_irq(pdev, 0);
>  	if (pdata->irq < 0)
> -		return dev_err_probe(&pdev->dev, -EINVAL, "Failed to get interrupt\n");
> +		return dev_err_probe(dev, -EINVAL, "Failed to get interrupt\n");
>
>  	error = of_property_read_u32(np, "power-off-time-sec", &val);
>  	if (!error) {
> @@ -162,7 +163,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
>  			bpt = (val / 5) - 1;
>  			break;
>  		default:
> -			return dev_err_probe(&pdev->dev, -EINVAL,
> +			return dev_err_probe(dev, -EINVAL,
>  					     "power-off-time-sec %d out of range\n", val);
>  		}
>
> @@ -182,7 +183,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
>
>  	input = devm_input_allocate_device(&pdev->dev);
>  	if (!input) {
> -		dev_err(&pdev->dev, "failed to allocate the input device\n");
> +		dev_err(dev, "failed to allocate the input device\n");
>  		return -ENOMEM;
>  	}
>
> @@ -193,27 +194,27 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
>  	input_set_capability(input, EV_KEY, pdata->keycode);
>
>  	/* input customer action to cancel release timer */
> -	error = devm_add_action(&pdev->dev, imx_snvs_pwrkey_act, pdata);
> +	error = devm_add_action(dev, imx_snvs_pwrkey_act, pdata);
>  	if (error)
> -		return dev_err_probe(&pdev->dev, error, "failed to register remove action\n");
> +		return dev_err_probe(dev, error, "failed to register remove action\n");
>
>  	pdata->input = input;
>  	platform_set_drvdata(pdev, pdata);
>
> -	error = devm_request_irq(&pdev->dev, pdata->irq,
> -			       imx_snvs_pwrkey_interrupt,
> -			       0, pdev->name, pdev);
> +	error = devm_request_irq(dev, pdata->irq,
> +				 imx_snvs_pwrkey_interrupt,
> +				 0, pdev->name, pdev);
>  	if (error)
> -		return dev_err_probe(&pdev->dev, error, "interrupt not available.\n");
> +		return dev_err_probe(dev, error, "interrupt not available.\n");
>
>  	error = input_register_device(input);
>  	if (error < 0)
> -		return dev_err_probe(&pdev->dev, error, "failed to register input device\n");
> +		return dev_err_probe(dev, error, "failed to register input device\n");
>
> -	device_init_wakeup(&pdev->dev, pdata->wakeup);
> -	error = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
> +	device_init_wakeup(dev, pdata->wakeup);
> +	error = dev_pm_set_wake_irq(dev, pdata->irq);
>  	if (error)
> -		dev_err(&pdev->dev, "irq wake enable failed.\n");
> +		dev_err(dev, "irq wake enable failed.\n");
>
>  	return 0;
>  }
>
> --
> 2.37.1
>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox