Linux Input/HID development
 help / color / mirror / Atom feed
* 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 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: 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] 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: 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: 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: 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: 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] 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

* [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

* [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 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 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] 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] 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 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

* 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] Input: xpad - add support for Razer Wolverine V3 Pro
From: ZlordHUN @ 2026-03-29 22:00 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Zoltan Illes

From: Zoltan Illes <zoliviragh@gmail.com>

Add device IDs for the Razer Wolverine V3 Pro controller in both
wired (0x0a57) and wireless 2.4 GHz dongle (0x0a59) modes.

The controller uses the Xbox 360 protocol (vendor-specific class,
subclass 93, protocol 1) on interface 0 with an identical 20-byte
input report layout, so no additional processing is needed.

Signed-off-by: Zoltan Illes <zoliviragh@gmail.com>
---
 drivers/input/joystick/xpad.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index bf4accf3f..b09080def 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -313,6 +313,8 @@ static const struct xpad_device {
 	{ 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
 	{ 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
 	{ 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE },
+	{ 0x1532, 0x0a57, "Razer Wolverine V3 Pro (Wired)", 0, XTYPE_XBOX360 },
+	{ 0x1532, 0x0a59, "Razer Wolverine V3 Pro (2.4 GHz Dongle)", 0, XTYPE_XBOX360 },
 	{ 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 },
 	{ 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
 	{ 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
-- 
2.43.0


^ permalink raw reply related

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

Hi Linus,

On Sat, Mar 28, 2026 at 04:55:47PM +0100, Linus Walleij wrote:
> 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",
> +};

You need to move this and registration into arch/mips/rb532/gpio.c,
export it and use it here: Bartosz is against using gpiohip label to
match with software node name and prefers identity matching.

...

> -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;
>  }

I suppose there is no reasonable way of making this work with
gpio-keys...

For input piece:

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

Thanks.

-- 
Dmitry

^ permalink raw reply

* RE: [PATCH] Hid: Intel-thc-hid: Intel-thc: Add more frequency support for SPI
From: Xu, Even @ 2026-03-30  0:41 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: bentiss@kernel.org, srinivas.pandruvada@linux.intel.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhang, Rui1
In-Reply-To: <3op0o0rq-o5r3-4n68-n3pp-237s14106qs5@xreary.bet>

Thanks Jiri!

Will use "HID" next time, thank for the reminder!

Best Regards,
Even Xu

> -----Original Message-----
> From: Jiri Kosina <jikos@kernel.org>
> Sent: Friday, March 27, 2026 8:32 PM
> To: Xu, Even <even.xu@intel.com>
> Cc: bentiss@kernel.org; srinivas.pandruvada@linux.intel.com; linux-
> input@vger.kernel.org; linux-kernel@vger.kernel.org; Zhang, Rui1
> <rui1.zhang@intel.com>
> Subject: Re: [PATCH] Hid: Intel-thc-hid: Intel-thc: Add more frequency support for
> SPI
> 
> 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 v3 7/9] regulator: mt6392: Add support for MT6392 regulator
From: Luca Leonardo Scorcia @ 2026-03-30  7:39 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: linux-mediatek, Fabien Parent, Val Packett, Dmitry Torokhov,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sen Chu,
	Sean Wang, Macpaul Lin, Lee Jones, Matthias Brugger,
	AngeloGioacchino Del Regno, Linus Walleij, Liam Girdwood,
	Mark Brown, Gary Bisson, Louis-Alexis Eyraud, Julien Massot,
	Chen Zhong, linux-input, devicetree, linux-kernel, linux-pm,
	linux-arm-kernel, linux-gpio
In-Reply-To: <CAGXv+5GmDtrtFHJXs+fDyF+dZ5YW-TSEqXnPs2xCH8cu-Xcn9w@mail.gmail.com>

Il giorno gio 19 mar 2026 alle ore 06:04 Chen-Yu Tsai
<wenst@chromium.org> ha scritto:

> If this PMIC is anything like the MT6358, then it has 0.01V fine
> tuning for most if not all the LDOs. It is sometimes needed as
> a rail may have a 0.04V boost that would otherwise be invisible
> to the system. And then if you have something like 3.04V set in
> the DT constraints, you end up with something the regulator driver
> doesn't support, but the hardware does.
>
> Please see how it's done in the MT6358 driver. I spent a lot of
> time on that driver to make it actually support the full range
> of voltages, and describing the supplies.
>

I had a good look at the datasheet (MT6392 PMIC Datasheet v1.0 08 Dec.
2016) and unfortunately I did not see any fine tuning option in there.
I'm sure this data sheet is not perfect as it's missing some regulator
registers that are clearly used in the Android sources, but there's no
mention of fine tuning in that code either. I guess it does not have
that capability.

I will shortly submit v4 that hopefully addresses the rest of the comments.

Thanks for your help!
--
Luca Leonardo Scorcia
l.scorcia@gmail.com

^ permalink raw reply

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

On 28/03/2026 at 16:55:48 +01, Linus Walleij <linusw@kernel.org> wrote:

> 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 +++++++++++++++++++++++-

Fine by me for the MTD bits!

Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl

^ permalink raw reply

* [PATCH v4 0/9] Add support for mt6392 PMIC
From: Luca Leonardo Scorcia @ 2026-03-30  8:29 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Luca Leonardo Scorcia, Dmitry Torokhov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sen Chu, Sean Wang,
	Macpaul Lin, Lee Jones, Matthias Brugger,
	AngeloGioacchino Del Regno, Linus Walleij, Liam Girdwood,
	Mark Brown, Gary Bisson, Val Packett, Julien Massot,
	Louis-Alexis Eyraud, Fabien Parent, Chen Zhong, linux-input,
	devicetree, linux-kernel, linux-pm, linux-arm-kernel, linux-gpio

The MediaTek mt6392 PMIC is usually found on devices powered by
the mt8516/mt8167 SoC and is yet another mt6323/mt6397 variant.

This series is mostly based around patches submitted a couple
years ago by Fabien Parent and not merged and from Val Packett's
submission from Jan 2025 that included extra cleanups, fixes, and a
new dtsi file similar to ones that exist for other PMICs. Some
comments weren't addressed and the series was ultimately not merged.

This series only enables four functions: regulators, keys, pinctrl
and RTC.

I added a handful of device tree improvements to fix some dtbs_check
errors, added support for the pinctrl device and addressed the comments
from last year's reviews.

The series has been tested on Xiaomi Mi Smart Clock x04g. In order for
pinctrl to probe successfully patch [1] has to be merged too, but
each patch set is independent from the other.

Changes in v4:
- Dropped usage of the regulator compatible
- Fixed commit messages text to properly reference the target subsystem
- Added supply rails to the regulator
- Reworked the regulator schema and PMIC dtsi. Now all supplies are
  documented and the schema no longer includes voltage information
- Removed redundant ldo- / buck- prefixes
- Renamed the pinfunc header to mediatek,mt6392-pinfunc.h
- Modified the MFD driver to use a simple identifier in the of_match
  data properties

Changes in v3 [2]:
- Added pinctrl device
- Changed mt6397-rtc fallback to mt6323-rtc
- Added schema for regulators
- Fixed checkpatch issues

Changes in v2 [3]:
- Replaced explicit compatibles with fallbacks

[1] https://lore.kernel.org/linux-mediatek/20260317110249.391552-1-l.scorcia@gmail.com/
[2] https://lore.kernel.org/linux-mediatek/20260317184507.523060-1-l.scorcia@gmail.com/
[3] https://lore.kernel.org/linux-mediatek/20260306120521.163654-1-l.scorcia@gmail.com/

Fabien Parent (4):
  dt-bindings: mfd: mt6397: Add MT6392 PMIC
  dt-bindings: input: mtk-pmic-keys: Add MT6392 PMIC keys
  mfd: mt6397: Add support for MT6392 PMIC
  regulator: Add MediaTek MT6392 regulator

Luca Leonardo Scorcia (3):
  regulator: dt-bindings: Add MediaTek MT6392 PMIC
  dt-bindings: pinctrl: mediatek,mt65xx: Add MT6392 pinctrl
  pinctrl: mediatek: mt6397: Add MediaTek MT6392

Val Packett (2):
  input: keyboard: mtk-pmic-keys: Add MT6392 support
  arm64: dts: mediatek: Add MediaTek MT6392 PMIC dtsi

 .../bindings/input/mediatek,pmic-keys.yaml    |   1 +
 .../bindings/mfd/mediatek,mt6397.yaml         |  11 +-
 .../pinctrl/mediatek,mt65xx-pinctrl.yaml      |   1 +
 .../regulator/mediatek,mt6392-regulator.yaml  |  74 +++
 arch/arm64/boot/dts/mediatek/mt6392.dtsi      |  73 +++
 drivers/input/keyboard/mtk-pmic-keys.c        |  17 +
 drivers/mfd/mt6397-core.c                     | 118 +++-
 drivers/mfd/mt6397-irq.c                      |   8 +
 drivers/pinctrl/mediatek/pinctrl-mt6397.c     |  37 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-mt6392.h |  64 +++
 drivers/regulator/Kconfig                     |   9 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/mt6392-regulator.c          | 509 ++++++++++++++++++
 .../pinctrl/mediatek,mt6392-pinfunc.h         |  39 ++
 .../regulator/mediatek,mt6392-regulator.h     |  24 +
 include/linux/mfd/mt6392/core.h               |  42 ++
 include/linux/mfd/mt6392/registers.h          | 487 +++++++++++++++++
 include/linux/mfd/mt6397/core.h               |   1 +
 include/linux/regulator/mt6392-regulator.h    |  42 ++
 19 files changed, 1527 insertions(+), 31 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6392-regulator.yaml
 create mode 100644 arch/arm64/boot/dts/mediatek/mt6392.dtsi
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt6392.h
 create mode 100644 drivers/regulator/mt6392-regulator.c
 create mode 100644 include/dt-bindings/pinctrl/mediatek,mt6392-pinfunc.h
 create mode 100644 include/dt-bindings/regulator/mediatek,mt6392-regulator.h
 create mode 100644 include/linux/mfd/mt6392/core.h
 create mode 100644 include/linux/mfd/mt6392/registers.h
 create mode 100644 include/linux/regulator/mt6392-regulator.h

-- 
2.43.0


^ permalink raw reply

* [PATCH v4 1/9] dt-bindings: mfd: mt6397: Add MT6392 PMIC
From: Luca Leonardo Scorcia @ 2026-03-30  8:29 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Fabien Parent, Val Packett, Luca Leonardo Scorcia,
	Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Matthias Brugger,
	AngeloGioacchino Del Regno, Linus Walleij, Liam Girdwood,
	Mark Brown, Louis-Alexis Eyraud, Gary Bisson, Julien Massot,
	Chen Zhong, linux-input, devicetree, linux-kernel, linux-pm,
	linux-arm-kernel, linux-gpio
In-Reply-To: <20260330083429.359819-1-l.scorcia@gmail.com>

From: Fabien Parent <parent.f@gmail.com>

Add the currently supported bindings for the MT6392 PMIC. Remove the
required constraint for the regulators node compatible property to fix a
dtbs_check error.

Signed-off-by: Fabien Parent <parent.f@gmail.com>
Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
---
 .../devicetree/bindings/mfd/mediatek,mt6397.yaml      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index 05c121b0cb3d..bfad018cfbf3 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -40,6 +40,10 @@ properties:
           - mediatek,mt6358
           - mediatek,mt6359
           - mediatek,mt6397
+      - items:
+          - enum:
+              - mediatek,mt6392
+          - const: mediatek,mt6323
       - items:
           - enum:
               - mediatek,mt6366
@@ -68,6 +72,10 @@ properties:
               - mediatek,mt6331-rtc
               - mediatek,mt6358-rtc
               - mediatek,mt6397-rtc
+          - items:
+              - enum:
+                  - mediatek,mt6392-rtc
+              - const: mediatek,mt6323-rtc
           - items:
               - enum:
                   - mediatek,mt6366-rtc
@@ -99,9 +107,6 @@ properties:
                   - mediatek,mt6366-regulator
               - const: mediatek,mt6358-regulator
 
-    required:
-      - compatible
-
   adc:
     type: object
     $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
-- 
2.43.0


^ permalink raw reply related

* [PATCH v4 2/9] dt-bindings: input: mtk-pmic-keys: Add MT6392 PMIC keys
From: Luca Leonardo Scorcia @ 2026-03-30  8:29 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Fabien Parent, Val Packett, Luca Leonardo Scorcia,
	AngeloGioacchino Del Regno, Dmitry Torokhov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sen Chu, Sean Wang,
	Macpaul Lin, Lee Jones, Matthias Brugger, Linus Walleij,
	Liam Girdwood, Mark Brown, Louis-Alexis Eyraud, Julien Massot,
	Gary Bisson, Chen Zhong, linux-input, devicetree, linux-kernel,
	linux-pm, linux-arm-kernel, linux-gpio
In-Reply-To: <20260330083429.359819-1-l.scorcia@gmail.com>

From: Fabien Parent <parent.f@gmail.com>

Add the binding documentation of mtk-pmic-keys for the MT6392 PMIC.

Signed-off-by: Fabien Parent <parent.f@gmail.com>
Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
index b95435bd6a9b..2d3c4161a7f8 100644
--- a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
+++ b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
@@ -30,6 +30,7 @@ properties:
       - mediatek,mt6357-keys
       - mediatek,mt6358-keys
       - mediatek,mt6359-keys
+      - mediatek,mt6392-keys
       - mediatek,mt6397-keys
 
   power-off-time-sec: true
-- 
2.43.0


^ permalink raw reply related


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