Linux Input/HID development
 help / color / mirror / Atom feed
* [RESEND PATCH 2/4] dt-bindings: input: touchscreen: fsl,imx6ul-tsc: add fsl,glitch-threshold
From: Dario Binacchi @ 2025-09-10 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Dario Binacchi, Conor Dooley, Dmitry Torokhov,
	Fabio Estevam, Haibo Chen, Krzysztof Kozlowski,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer, Shawn Guo,
	devicetree, imx, linux-arm-kernel, linux-input
In-Reply-To: <20250910135916.3939502-1-dario.binacchi@amarulasolutions.com>

Add support for glitch threshold configuration. A detected signal is valid
only if it lasts longer than the set threshold; otherwise, it is regarded
as a glitch.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 .../input/touchscreen/fsl,imx6ul-tsc.yaml      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
index 678756ad0f92..2fee2940213f 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
@@ -62,6 +62,23 @@ properties:
     description: Number of data samples which are averaged for each read.
     enum: [ 1, 4, 8, 16, 32 ]
 
+  fsl,glitch-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 0
+    enum: [ 0, 1, 2, 3 ]
+    description: |
+      Indicates the glitch threshold. The threshold is defined by number
+      of clock cycles. A detect signal is only valid if it is exist longer
+      than threshold; otherwise, it is regarded as a glitch.
+      0: Normal function: 8191 clock cycles
+         Low power mode: 9 clock cycles
+      1: Normal function: 4095 clock cycles
+         Low power mode: 7 clock cycles
+      2: Normal function: 2047 clock cycles
+         Low power mode: 5 clock cycles
+      3: Normal function: 1023 clock cycles
+         Low power mode: 3 clock cycles
+
 required:
   - compatible
   - reg
@@ -94,4 +111,5 @@ examples:
         measure-delay-time = <0xfff>;
         pre-charge-time = <0xffff>;
         touchscreen-average-samples = <32>;
+        fsl,glitch-threshold = <2>;
     };
-- 
2.43.0


^ permalink raw reply related

* [RESEND PATCH 1/4] Input: imx6ul_tsc - fix typo in register name
From: Dario Binacchi @ 2025-09-10 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Michael Trimarchi, Dario Binacchi, Dmitry Torokhov,
	Fabio Estevam, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo,
	imx, linux-arm-kernel, linux-input
In-Reply-To: <20250910135916.3939502-1-dario.binacchi@amarulasolutions.com>

From: Michael Trimarchi <michael@amarulasolutions.com>

Replace 'SETING' with 'SETTING'.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 drivers/input/touchscreen/imx6ul_tsc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c
index 6ac8fa84ed9f..c2c6e50efc54 100644
--- a/drivers/input/touchscreen/imx6ul_tsc.c
+++ b/drivers/input/touchscreen/imx6ul_tsc.c
@@ -55,7 +55,7 @@
 #define ADC_TIMEOUT		msecs_to_jiffies(100)
 
 /* TSC registers */
-#define REG_TSC_BASIC_SETING	0x00
+#define REG_TSC_BASIC_SETTING	0x00
 #define REG_TSC_PRE_CHARGE_TIME	0x10
 #define REG_TSC_FLOW_CONTROL	0x20
 #define REG_TSC_MEASURE_VALUE	0x30
@@ -192,7 +192,7 @@ static void imx6ul_tsc_set(struct imx6ul_tsc *tsc)
 
 	basic_setting |= tsc->measure_delay_time << 8;
 	basic_setting |= DETECT_4_WIRE_MODE | AUTO_MEASURE;
-	writel(basic_setting, tsc->tsc_regs + REG_TSC_BASIC_SETING);
+	writel(basic_setting, tsc->tsc_regs + REG_TSC_BASIC_SETTING);
 
 	writel(DE_GLITCH_2, tsc->tsc_regs + REG_TSC_DEBUG_MODE2);
 
-- 
2.43.0


^ permalink raw reply related

* [RESEND PATCH 0/4] Input: imx6ul_tsc - set glitch threshold by dts property
From: Dario Binacchi @ 2025-09-10 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Dario Binacchi, Conor Dooley, Dmitry Torokhov,
	Fabio Estevam, Haibo Chen, Krzysztof Kozlowski, Michael Trimarchi,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer, Shawn Guo,
	devicetree, imx, linux-arm-kernel, linux-input

The series allows setting the glitch threshold for the detected signal
from a DTS property instead of a hardcoded value.
In addition, I applied a patch that replaces opencoded masking and
shifting, with BIT(), GENMASK(), FIELD_GET() and FIELD_PREP() macros.


Dario Binacchi (3):
  dt-bindings: input: touchscreen: fsl,imx6ul-tsc: add
    fsl,glitch-threshold
  Input: imx6ul_tsc - set glitch threshold by DTS property
  Input: imx6ul_tsc - use BIT, FIELD_{GET,PREP} and GENMASK macros

Michael Trimarchi (1):
  Input: imx6ul_tsc - fix typo in register name

 .../input/touchscreen/fsl,imx6ul-tsc.yaml     |  18 +++
 drivers/input/touchscreen/imx6ul_tsc.c        | 112 +++++++++++-------
 2 files changed, 86 insertions(+), 44 deletions(-)

-- 
2.43.0

base-commit: 9dd1835ecda5b96ac88c166f4a87386f3e727bd9
branch: tsc_de_glitch

^ permalink raw reply

* Re: [PATCH v3] HID: lg-g15 - Add support for Logitech G13.
From: Hans de Goede @ 2025-09-10 11:09 UTC (permalink / raw)
  To: Leo L. Schwab
  Cc: Kate Hsuan, Jiri Kosina, Benjamin Tissoires, linux-input,
	linux-kernel
In-Reply-To: <aMESMcFLrzqrCdbq@ewhac.org>

Hi,

On 10-Sep-25 7:52 AM, Leo L. Schwab wrote:
> On Mon, Sep 08, 2025 at 11:08:29PM +0200, Hans de Goede wrote:
>> There are 2 improvements which I would like to see:
>>
>> 1. When the backlight is turned on through the button, you
>> should pass g15_led->brightness to the notify() call rather
>> then LED_FULL. GNOME will show an OSD with the new brightness
>> value shown as a mini progress bar similar to how it shows
>> speaker volume when doing mute/unmute. This mini progress
>> bar should show the actual brightness being restored, not
>> always full brightness.
>>
> 	If g15_led->brightness is subsequently changed, should a new
> notify() call also be made with that new brightness, i.e. should
> `hw_brightness_changed` be made to track `brightness`?

No, hw_brightness_changed only track changes done independently
by the hw. sysfs writes should not call notify().

> Indeed, it looks
> like you do this in `lg_g15_leds_changed_work()`.

That is for the original G15 and G15-v2, where the buttion
cycles through a couple of backlight levels (IIRC). That work
only gets queued when we receive a button press notification
and then it *reads* the new brightness from the keyboard and
uses that for the notify().

That work does not get queued/used for normal sysfs writes.

>> 2. ATM if the backlight is turned off on the G13 when
>> the driver loads and then one of the buttons gets pressed
>> then a notify() will happen because the led_cdev.hw_brightness_changed
>> value of -1 will be different from the value of 0 in the
>> input-report. This notify will lead to an unwanted OSD
>> notification in GNOME, so this needs to be fixed.
>> IMHO the best fix would be to use:
>>
>> 	hid_hw_raw_request(..., HID_INPUT_REPORT, HID_REQ_GET_REPORT);
>>
>> at probe to get the input-report so that the driver will
>> actually now the backlight state at probe() time without
>> needing to wait for the first time the input-report is send.
>>
> 	Will give this a try.
> 
>> I'll wait for your G13 support to land first and then
>> rebase the G510 patch on top.
>>
> 	Roger that.

Regards,

Hans



^ permalink raw reply

* Re: [PATCH v3 3/3] arm64: dts: mediatek: mt8395-nio-12l: add support for blue and red LEDs
From: Matthias Brugger @ 2025-09-10  9:48 UTC (permalink / raw)
  To: Julien Massot, kernel, Dmitry Torokhov,
	AngeloGioacchino Del Regno, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Louis-Alexis Eyraud
  Cc: linux-input, linux-kernel, linux-arm-kernel, linux-mediatek,
	devicetree
In-Reply-To: <20250905-radxa-nio-12-l-gpio-v3-3-40f11377fb55@collabora.com>



On 05/09/2025 13:52, Julien Massot wrote:
> The Radxa NIO 12L board has an RGB LED, of which only red and blue
> are controllable.
> 
> Red and blue LEDs: no need to choose, both are enabled.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> ---
>   .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts     | 29 ++++++++++++++++++++++
>   1 file changed, 29 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> index fd596e2298285361ad7c2fb828feec598d75a73e..0ea36e7c960fc0b2607833d743c5e2e806864600 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> @@ -10,6 +10,7 @@
>   #include <dt-bindings/gpio/gpio.h>
>   #include <dt-bindings/input/input.h>
>   #include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/leds/common.h>
>   #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
>   #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
>   #include <dt-bindings/spmi/spmi.h>
> @@ -73,6 +74,26 @@ button-volume-up {
>   		};
>   	};
>   
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_pins>;
> +		pinctrl-names = "default";
> +
> +		/*
> +		 * This board has a RGB LED, of which only R and B
> +		 * are controllable.
> +		 */
> +		rgb-blue {

Please fix the DT warnings and submit again.

Matthias

> +			color = <LED_COLOR_ID_BLUE>;
> +			gpios = <&pio 6 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		led-1 {
> +			color = <LED_COLOR_ID_RED>;
> +			gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +
>   	wifi_vreg: regulator-wifi-3v3-en {
>   		compatible = "regulator-fixed";
>   		regulator-name = "wifi_3v3_en";
> @@ -647,6 +668,14 @@ pins {
>   		};
>   	};
>   
> +	gpio_leds_pins: gpio-leds-pins {
> +		pins {
> +			pinmux = <PINMUX_GPIO6__FUNC_GPIO6>,
> +				 <PINMUX_GPIO7__FUNC_GPIO7>;
> +			output-low;
> +		};
> +	};
> +
>   	i2c2_pins: i2c2-pins {
>   		pins-bus {
>   			pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
> 


^ permalink raw reply

* Re: [PATCH v3] HID: lg-g15 - Add support for Logitech G13.
From: Leo L. Schwab @ 2025-09-10  5:52 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Kate Hsuan, Jiri Kosina, Benjamin Tissoires, linux-input,
	linux-kernel
In-Reply-To: <c12adb45-fa6d-4bb8-afd2-a02e3026d646@kernel.org>

On Mon, Sep 08, 2025 at 11:08:29PM +0200, Hans de Goede wrote:
> There are 2 improvements which I would like to see:
> 
> 1. When the backlight is turned on through the button, you
> should pass g15_led->brightness to the notify() call rather
> then LED_FULL. GNOME will show an OSD with the new brightness
> value shown as a mini progress bar similar to how it shows
> speaker volume when doing mute/unmute. This mini progress
> bar should show the actual brightness being restored, not
> always full brightness.
>
	If g15_led->brightness is subsequently changed, should a new
notify() call also be made with that new brightness, i.e. should
`hw_brightness_changed` be made to track `brightness`?  Indeed, it looks
like you do this in `lg_g15_leds_changed_work()`.

> 2. ATM if the backlight is turned off on the G13 when
> the driver loads and then one of the buttons gets pressed
> then a notify() will happen because the led_cdev.hw_brightness_changed
> value of -1 will be different from the value of 0 in the
> input-report. This notify will lead to an unwanted OSD
> notification in GNOME, so this needs to be fixed.
> IMHO the best fix would be to use:
> 
> 	hid_hw_raw_request(..., HID_INPUT_REPORT, HID_REQ_GET_REPORT);
> 
> at probe to get the input-report so that the driver will
> actually now the backlight state at probe() time without
> needing to wait for the first time the input-report is send.
>
	Will give this a try.

> I'll wait for your G13 support to land first and then
> rebase the G510 patch on top.
> 
	Roger that.

					Schwab

^ permalink raw reply

* (no subject)
From: Raf D'Halleweyn @ 2025-09-10  2:44 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input

Hi,

I think there may be a bug in the 6.17 RC versions of hid_multitouch
when used for the touchpad on a Dell XPS 9310. The touchpad will
frequently get stuck in scroll mode. The touchpad works normal on
6.16.

I don't see anything in the kernel logs to suggest any malfunction. I
reviewed the RC changes for hid_multitouch and did not see anything
obvious (maybe the bug is somewhere else?).

Let me know what information I can provide, or test to perform.

Thanks,

Raf

^ permalink raw reply

* Re: [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties
From: Rob Herring (Arm) @ 2025-09-10  2:36 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: linux-input, Krzysztof Kozlowski, Conor Dooley, Dmitry Torokhov,
	Henrik Rydberg, devicetree, linux-kernel, Nick Dyer,
	Linus Walleij
In-Reply-To: <20250909054903.11519-2-clamor95@gmail.com>


On Tue, 09 Sep 2025 08:49:02 +0300, Svyatoslav Ryhel wrote:
> Since atmel,maxtouch describes touchscreens too, it should include common
> touchscreen properties.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  Documentation/devicetree/bindings/input/atmel,maxtouch.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply

* Re: [PATCH v4] HID: logitech-dj: Add support for a new lightspeed receiver iteration
From: Stuart @ 2025-09-09 23:24 UTC (permalink / raw)
  To: Mavroudis Chatzilazaridis
  Cc: jikos, linux-input, benjamin.tissoires, hadess, lains
In-Reply-To: <cc2e6e2d-1b42-444a-9f8e-153fa898be44@protonmail.com>

> Can you try applying the following?

Yep, this on top of the v4 patch works as expected.
Thank you for getting this working.

Tested-by: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>

Thanks,
Stuart

^ permalink raw reply

* Re: [PATCH v4] HID: logitech-dj: Add support for a new lightspeed receiver iteration
From: Mavroudis Chatzilazaridis @ 2025-09-09 22:23 UTC (permalink / raw)
  To: Stuart; +Cc: jikos, linux-input, benjamin.tissoires, hadess, lains
In-Reply-To: <CALTg27mj+XcOmnMcH8vo5Bos+HxoWes-XW1eqfKDjnj5uqCc5w@mail.gmail.com>

On 2025-09-09 02.59, Stuart wrote:
> What does logitech-dj do differently to the generic HID driver around the LEDs?
> The caps lock LED works perfectly fine with the generic driver.
> 
> If that goes nowhere, surely I could do a packet capture from Linux, with and
> without the logitech-dj driver active?
> 
> Stuart

Since the first diff you tested was supposed to send the exact same 
report as the generic hid driver, I incorrectly came to the conclusion 
that the Logitech kernel driver must be doing something different.

Turns out the report ID was being forced to 0 when it should have been 1.

Can you try applying the following?

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 00a975b70f59..9b3b00d69079 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -78,6 +78,7 @@
 #define REPORT_TYPE_SYSTEM_CONTROL		0x04
 #define REPORT_TYPE_MEDIA_CENTER		0x08
 #define REPORT_TYPE_LEDS			0x0E
+#define REPORT_TYPE_LEDS_LIGHTSPEED		0x01
 
 /* RF Report types bitfield */
 #define STD_KEYBOARD				BIT(1)
@@ -1455,16 +1456,28 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,
 				count, report_type, reqtype);
 	}
 
-	if (buf[0] != REPORT_TYPE_LEDS)
-		return -EINVAL;
+	/* This Lightspeed receiver type uses a different LED report ID */
+	if (djrcv_dev->type == recvr_type_gaming_hidpp_ls_1_3) {
+		if (buf[0] != REPORT_TYPE_LEDS_LIGHTSPEED)
+			return -EINVAL;
+	} else {
+		if (buf[0] != REPORT_TYPE_LEDS)
+			return -EINVAL;
+	}
 
 	if (djrcv_dev->type != recvr_type_dj && count >= 2) {
+		unsigned char reportnum_led = 0;
 		if (!djrcv_dev->keyboard) {
 			hid_warn(hid, "Received REPORT_TYPE_LEDS request before the keyboard interface was enumerated\n");
 			return 0;
 		}
+
+		/* This Lightspeed receiver expects LED reports with the ID defined in the HID descriptor */
+		if (djrcv_dev->type == recvr_type_gaming_hidpp_ls_1_3)
+			reportnum_led = reportnum;
+
 		/* usbhid overrides the report ID and ignores the first byte */
-		return hid_hw_raw_request(djrcv_dev->keyboard, 0, buf, count,
+		return hid_hw_raw_request(djrcv_dev->keyboard, reportnum_led, buf, count,
 					  report_type, reqtype);
 	}
 



^ permalink raw reply related

* Re: [PATCH 2/2] Input: pm8941-pwrkey - Disable wakeup for resin by default
From: Neil Armstrong @ 2025-09-09 14:55 UTC (permalink / raw)
  To: Luca Weiss, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Courtney Cavin, Vinod Koul
  Cc: Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel
In-Reply-To: <20250909-resin-wakeup-v1-2-46159940e02b@lucaweiss.eu>

On 09/09/2025 15:23, Luca Weiss wrote:
> 'Resin' (*Res*et *In*put) is usually connected to a volume down button
> on devices, which is usually not expected to wake up the device from
> suspend.
> 
> On the other hand, pwrkey should keep wakeup on. So do not enable wakeup
> for resin unless the "wakeup-source" property is specified in
> devicetree.
> 
> Note, that this does change behavior by turning off wakeup by default
> for 'resin' and requiring a new dt property to be added to turn it on
> again. But since this is not expected behavior in the first place, and
> most users will not expect this, I'd argue this change is acceptable.
> 
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
>   drivers/input/misc/pm8941-pwrkey.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
> index d952c16f24582bfc792e335a1fc954919561fa87..53249d2c081fba8b8235393e14736494bf9b238b 100644
> --- a/drivers/input/misc/pm8941-pwrkey.c
> +++ b/drivers/input/misc/pm8941-pwrkey.c
> @@ -60,6 +60,7 @@ struct pm8941_data {
>   	bool		supports_ps_hold_poff_config;
>   	bool		supports_debounce_config;
>   	bool		has_pon_pbs;
> +	bool		wakeup_source_default;
>   	const char	*name;
>   	const char	*phys;
>   };
> @@ -245,7 +246,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops,
>   static int pm8941_pwrkey_probe(struct platform_device *pdev)
>   {
>   	struct pm8941_pwrkey *pwrkey;
> -	bool pull_up;
> +	bool pull_up, wakeup;
>   	struct device *parent;
>   	struct device_node *regmap_node;
>   	const __be32 *addr;
> @@ -402,8 +403,11 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev)
>   		}
>   	}
>   
> +	wakeup = pwrkey->data->wakeup_source_default ||
> +		of_property_read_bool(pdev->dev.of_node, "wakeup-source");
> +
>   	platform_set_drvdata(pdev, pwrkey);
> -	device_init_wakeup(&pdev->dev, 1);
> +	device_init_wakeup(&pdev->dev, wakeup);
>   
>   	return 0;
>   }
> @@ -424,6 +428,7 @@ static const struct pm8941_data pwrkey_data = {
>   	.supports_ps_hold_poff_config = true,
>   	.supports_debounce_config = true,
>   	.has_pon_pbs = false,
> +	.wakeup_source_default = true,
>   };
>   
>   static const struct pm8941_data resin_data = {
> @@ -434,6 +439,7 @@ static const struct pm8941_data resin_data = {
>   	.supports_ps_hold_poff_config = true,
>   	.supports_debounce_config = true,
>   	.has_pon_pbs = false,
> +	.wakeup_source_default = false,
>   };
>   
>   static const struct pm8941_data pon_gen3_pwrkey_data = {
> @@ -443,6 +449,7 @@ static const struct pm8941_data pon_gen3_pwrkey_data = {
>   	.supports_ps_hold_poff_config = false,
>   	.supports_debounce_config = false,
>   	.has_pon_pbs = true,
> +	.wakeup_source_default = true,
>   };
>   
>   static const struct pm8941_data pon_gen3_resin_data = {
> @@ -452,6 +459,7 @@ static const struct pm8941_data pon_gen3_resin_data = {
>   	.supports_ps_hold_poff_config = false,
>   	.supports_debounce_config = false,
>   	.has_pon_pbs = true,
> +	.wakeup_source_default = false,
>   };
>   
>   static const struct of_device_id pm8941_pwr_key_id_table[] = {
> 

Thanks !

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Dmitry Torokhov @ 2025-09-09 14:54 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Courtney Cavin, Vinod Koul, Bhushan Shah,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-input, devicetree, linux-kernel
In-Reply-To: <dcdbc6424db6953dfc39fc05e0e050ab@lucaweiss.eu>

On Tue, Sep 09, 2025 at 04:41:26PM +0200, Luca Weiss wrote:
> On 2025-09-09 16:33, Krzysztof Kozlowski wrote:
> > On 09/09/2025 16:08, Dmitry Torokhov wrote:
> > > > >    compatible:
> > > > >      enum:
> > > > > @@ -36,6 +33,11 @@ properties:
> > > > >             pin should be configured for pull up.
> > > > >      $ref: /schemas/types.yaml#/definitions/flag
> > > > > 
> > > > > +  wakeup-source:
> > > > > +    description: |
> > > > > +           Button can wake-up the system. Only applicable
> > > > > for 'resin',
> > > > > +           'pwrkey' always wakes the system by default.
> > > > 
> > > > 
> > > > I'll fix existing code, so don't repeat that style.
> > > 
> > > If you ack I can reformat on my side to match the patch you just sent.
> > 
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Thanks for fixing that up Krzysztof! I noticed but didn't want to deviate
> from the style just for this description. Of course better to fix the
> formatting in the first place.
> 
> @Dmitry: Maybe give this patch some time (1-2 weeks?) to gather more
> feedback,
> given the reasons outlined in the cover letter. Also on the driver patch.

OK, I'll hold on to this for a couple of weeks.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Luca Weiss @ 2025-09-09 14:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dmitry Torokhov
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Courtney Cavin,
	Vinod Koul, Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel
In-Reply-To: <9e39f1b4-63b2-4c6a-8b31-6360be1952e6@kernel.org>

On 2025-09-09 16:33, Krzysztof Kozlowski wrote:
> On 09/09/2025 16:08, Dmitry Torokhov wrote:
>>>>    compatible:
>>>>      enum:
>>>> @@ -36,6 +33,11 @@ properties:
>>>>             pin should be configured for pull up.
>>>>      $ref: /schemas/types.yaml#/definitions/flag
>>>> 
>>>> +  wakeup-source:
>>>> +    description: |
>>>> +           Button can wake-up the system. Only applicable for 
>>>> 'resin',
>>>> +           'pwrkey' always wakes the system by default.
>>> 
>>> 
>>> I'll fix existing code, so don't repeat that style.
>> 
>> If you ack I can reformat on my side to match the patch you just sent.
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks for fixing that up Krzysztof! I noticed but didn't want to 
deviate
from the style just for this description. Of course better to fix the
formatting in the first place.

@Dmitry: Maybe give this patch some time (1-2 weeks?) to gather more 
feedback,
given the reasons outlined in the cover letter. Also on the driver 
patch.

Regards
Luca

> 
> Best regards,
> Krzysztof

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Krzysztof Kozlowski @ 2025-09-09 14:33 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Luca Weiss, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul, Bhushan Shah,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-input, devicetree, linux-kernel
In-Reply-To: <phctwoxml7hscwcgaipl233lotnrkgcpe7rxvhm5syoiadu3lv@ibgeib4kjyhs>

On 09/09/2025 16:08, Dmitry Torokhov wrote:
>>>    compatible:
>>>      enum:
>>> @@ -36,6 +33,11 @@ properties:
>>>             pin should be configured for pull up.
>>>      $ref: /schemas/types.yaml#/definitions/flag
>>>  
>>> +  wakeup-source:
>>> +    description: |
>>> +           Button can wake-up the system. Only applicable for 'resin',
>>> +           'pwrkey' always wakes the system by default.
>>
>>
>> I'll fix existing code, so don't repeat that style.
> 
> If you ack I can reformat on my side to match the patch you just sent.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

^ permalink raw reply

* Re: [PATCH] dt-bindings: input: qcom,pm8941-pwrkey: Fix formatting of descriptions
From: Dmitry Torokhov @ 2025-09-09 14:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Courtney Cavin,
	Vinod Koul, linux-arm-msm, linux-input, devicetree, linux-kernel,
	Luca Weiss
In-Reply-To: <20250909140331.69756-2-krzysztof.kozlowski@linaro.org>

On Tue, Sep 09, 2025 at 04:03:32PM +0200, Krzysztof Kozlowski wrote:
> Property descriptions should indent with two spaces and they do not need
> to preserve formatting.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 

Applied, thank you.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Dmitry Torokhov @ 2025-09-09 14:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Luca Weiss, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul, Bhushan Shah,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-input, devicetree, linux-kernel
In-Reply-To: <efb03993-0481-45ed-8f7e-8b65519a55cb@kernel.org>

On Tue, Sep 09, 2025 at 04:02:47PM +0200, Krzysztof Kozlowski wrote:
> On 09/09/2025 15:23, Luca Weiss wrote:
> > The 'resin' keys (usually connected to a volume-down button) are
> > generally not supposed to wake up the device from suspend, so explicitly
> > document a wakeup-source property to enable this wakeup behavior.
> > 
> > For 'pwrkey' the default stays that pressing the button does wake up the
> > device from suspend.
> > 
> > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > ---
> >  .../bindings/input/qcom,pm8941-pwrkey.yaml          | 21 ++++++++++++++++++---
> >  1 file changed, 18 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> > index 62314a5fdce59bb00d1e8b86d6a29a091128aa50..62a08e675ef9511e0ae9ed9fbab5694ab7242c35 100644
> > --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> > +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> > @@ -10,9 +10,6 @@ maintainers:
> >    - Courtney Cavin <courtney.cavin@sonymobile.com>
> >    - Vinod Koul <vkoul@kernel.org>
> >  
> > -allOf:
> > -  - $ref: input.yaml#
> > -
> >  properties:
> >    compatible:
> >      enum:
> > @@ -36,6 +33,11 @@ properties:
> >             pin should be configured for pull up.
> >      $ref: /schemas/types.yaml#/definitions/flag
> >  
> > +  wakeup-source:
> > +    description: |
> > +           Button can wake-up the system. Only applicable for 'resin',
> > +           'pwrkey' always wakes the system by default.
> 
> 
> I'll fix existing code, so don't repeat that style.

If you ack I can reformat on my side to match the patch you just sent.

Thanks.

-- 
Dmitry

^ permalink raw reply

* [PATCH] dt-bindings: input: qcom,pm8941-pwrkey: Fix formatting of descriptions
From: Krzysztof Kozlowski @ 2025-09-09 14:03 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul, linux-arm-msm, linux-input,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Luca Weiss

Property descriptions should indent with two spaces and they do not need
to preserve formatting.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Luca Weiss <luca@lucaweiss.eu>
---
 .../bindings/input/qcom,pm8941-pwrkey.yaml    | 21 +++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
index 62314a5fdce5..72006a14fd41 100644
--- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
+++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
@@ -25,23 +25,22 @@ properties:
     maxItems: 1
 
   debounce:
-    description: |
-          Time in microseconds that key must be pressed or
-          released for state change interrupt to trigger.
+    description:
+      Time in microseconds that key must be pressed or released for state
+      change interrupt to trigger.
     $ref: /schemas/types.yaml#/definitions/uint32
 
   bias-pull-up:
-    description: |
-           Presence of this property indicates that the KPDPWR_N
-           pin should be configured for pull up.
+    description:
+      Presence of this property indicates that the KPDPWR_N pin should be
+      configured for pull up.
     $ref: /schemas/types.yaml#/definitions/flag
 
   linux,code:
-    description: |
-           The input key-code associated with the power key.
-           Use the linux event codes defined in
-           include/dt-bindings/input/linux-event-codes.h
-           When property is omitted KEY_POWER is assumed.
+    description:
+      The input key-code associated with the power key.  Use the linux event
+      codes defined in include/dt-bindings/input/linux-event-codes.h.
+      When property is omitted KEY_POWER is assumed.
 
 required:
   - compatible
-- 
2.48.1


^ permalink raw reply related

* Re: [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Krzysztof Kozlowski @ 2025-09-09 14:02 UTC (permalink / raw)
  To: Luca Weiss, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Courtney Cavin, Vinod Koul
  Cc: Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel
In-Reply-To: <20250909-resin-wakeup-v1-1-46159940e02b@lucaweiss.eu>

On 09/09/2025 15:23, Luca Weiss wrote:
> The 'resin' keys (usually connected to a volume-down button) are
> generally not supposed to wake up the device from suspend, so explicitly
> document a wakeup-source property to enable this wakeup behavior.
> 
> For 'pwrkey' the default stays that pressing the button does wake up the
> device from suspend.
> 
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
>  .../bindings/input/qcom,pm8941-pwrkey.yaml          | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> index 62314a5fdce59bb00d1e8b86d6a29a091128aa50..62a08e675ef9511e0ae9ed9fbab5694ab7242c35 100644
> --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> @@ -10,9 +10,6 @@ maintainers:
>    - Courtney Cavin <courtney.cavin@sonymobile.com>
>    - Vinod Koul <vkoul@kernel.org>
>  
> -allOf:
> -  - $ref: input.yaml#
> -
>  properties:
>    compatible:
>      enum:
> @@ -36,6 +33,11 @@ properties:
>             pin should be configured for pull up.
>      $ref: /schemas/types.yaml#/definitions/flag
>  
> +  wakeup-source:
> +    description: |
> +           Button can wake-up the system. Only applicable for 'resin',
> +           'pwrkey' always wakes the system by default.


I'll fix existing code, so don't repeat that style.


Best regards,
Krzysztof

^ permalink raw reply

* [PATCH 2/2] Input: pm8941-pwrkey - Disable wakeup for resin by default
From: Luca Weiss @ 2025-09-09 13:23 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul
  Cc: Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250909-resin-wakeup-v1-0-46159940e02b@lucaweiss.eu>

'Resin' (*Res*et *In*put) is usually connected to a volume down button
on devices, which is usually not expected to wake up the device from
suspend.

On the other hand, pwrkey should keep wakeup on. So do not enable wakeup
for resin unless the "wakeup-source" property is specified in
devicetree.

Note, that this does change behavior by turning off wakeup by default
for 'resin' and requiring a new dt property to be added to turn it on
again. But since this is not expected behavior in the first place, and
most users will not expect this, I'd argue this change is acceptable.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
 drivers/input/misc/pm8941-pwrkey.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
index d952c16f24582bfc792e335a1fc954919561fa87..53249d2c081fba8b8235393e14736494bf9b238b 100644
--- a/drivers/input/misc/pm8941-pwrkey.c
+++ b/drivers/input/misc/pm8941-pwrkey.c
@@ -60,6 +60,7 @@ struct pm8941_data {
 	bool		supports_ps_hold_poff_config;
 	bool		supports_debounce_config;
 	bool		has_pon_pbs;
+	bool		wakeup_source_default;
 	const char	*name;
 	const char	*phys;
 };
@@ -245,7 +246,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops,
 static int pm8941_pwrkey_probe(struct platform_device *pdev)
 {
 	struct pm8941_pwrkey *pwrkey;
-	bool pull_up;
+	bool pull_up, wakeup;
 	struct device *parent;
 	struct device_node *regmap_node;
 	const __be32 *addr;
@@ -402,8 +403,11 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev)
 		}
 	}
 
+	wakeup = pwrkey->data->wakeup_source_default ||
+		of_property_read_bool(pdev->dev.of_node, "wakeup-source");
+
 	platform_set_drvdata(pdev, pwrkey);
-	device_init_wakeup(&pdev->dev, 1);
+	device_init_wakeup(&pdev->dev, wakeup);
 
 	return 0;
 }
@@ -424,6 +428,7 @@ static const struct pm8941_data pwrkey_data = {
 	.supports_ps_hold_poff_config = true,
 	.supports_debounce_config = true,
 	.has_pon_pbs = false,
+	.wakeup_source_default = true,
 };
 
 static const struct pm8941_data resin_data = {
@@ -434,6 +439,7 @@ static const struct pm8941_data resin_data = {
 	.supports_ps_hold_poff_config = true,
 	.supports_debounce_config = true,
 	.has_pon_pbs = false,
+	.wakeup_source_default = false,
 };
 
 static const struct pm8941_data pon_gen3_pwrkey_data = {
@@ -443,6 +449,7 @@ static const struct pm8941_data pon_gen3_pwrkey_data = {
 	.supports_ps_hold_poff_config = false,
 	.supports_debounce_config = false,
 	.has_pon_pbs = true,
+	.wakeup_source_default = true,
 };
 
 static const struct pm8941_data pon_gen3_resin_data = {
@@ -452,6 +459,7 @@ static const struct pm8941_data pon_gen3_resin_data = {
 	.supports_ps_hold_poff_config = false,
 	.supports_debounce_config = false,
 	.has_pon_pbs = true,
+	.wakeup_source_default = false,
 };
 
 static const struct of_device_id pm8941_pwr_key_id_table[] = {

-- 
2.51.0


^ permalink raw reply related

* [PATCH 0/2] Disable wakeup for resin keys by default
From: Luca Weiss @ 2025-09-09 13:23 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul
  Cc: Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel, Luca Weiss

'Resin' (*Res*et *In*put) on Qualcomm PMICs is usually connected to
volume down buttons on devices, which are usually not expected to wake
up the device from suspend.

On the other hand, pwrkey should keep wakeup on.

Note, that this does change behavior by turning off wakeup by default
for 'resin' and requiring a new dt property to be added to turn it on
again. But since this is not expected behavior in the first place, and
most users will not expect this, I'd argue this change is acceptable.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
Luca Weiss (2):
      dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
      Input: pm8941-pwrkey - Disable wakeup for resin by default

 .../bindings/input/qcom,pm8941-pwrkey.yaml          | 21 ++++++++++++++++++---
 drivers/input/misc/pm8941-pwrkey.c                  | 12 ++++++++++--
 2 files changed, 28 insertions(+), 5 deletions(-)
---
base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
change-id: 20250909-resin-wakeup-ebc77fe75b81

Best regards,
-- 
Luca Weiss <luca@lucaweiss.eu>


^ permalink raw reply

* [PATCH 1/2] dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
From: Luca Weiss @ 2025-09-09 13:23 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Courtney Cavin, Vinod Koul
  Cc: Bhushan Shah, ~postmarketos/upstreaming, phone-devel,
	linux-arm-msm, linux-input, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250909-resin-wakeup-v1-0-46159940e02b@lucaweiss.eu>

The 'resin' keys (usually connected to a volume-down button) are
generally not supposed to wake up the device from suspend, so explicitly
document a wakeup-source property to enable this wakeup behavior.

For 'pwrkey' the default stays that pressing the button does wake up the
device from suspend.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
 .../bindings/input/qcom,pm8941-pwrkey.yaml          | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
index 62314a5fdce59bb00d1e8b86d6a29a091128aa50..62a08e675ef9511e0ae9ed9fbab5694ab7242c35 100644
--- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
+++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
@@ -10,9 +10,6 @@ maintainers:
   - Courtney Cavin <courtney.cavin@sonymobile.com>
   - Vinod Koul <vkoul@kernel.org>
 
-allOf:
-  - $ref: input.yaml#
-
 properties:
   compatible:
     enum:
@@ -36,6 +33,11 @@ properties:
            pin should be configured for pull up.
     $ref: /schemas/types.yaml#/definitions/flag
 
+  wakeup-source:
+    description: |
+           Button can wake-up the system. Only applicable for 'resin',
+           'pwrkey' always wakes the system by default.
+
   linux,code:
     description: |
            The input key-code associated with the power key.
@@ -43,6 +45,19 @@ properties:
            include/dt-bindings/input/linux-event-codes.h
            When property is omitted KEY_POWER is assumed.
 
+allOf:
+  - $ref: input.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,pm8941-pwrkey
+              - qcom,pmk8350-pwrkey
+    then:
+      properties:
+        wakeup-source: false
+
 required:
   - compatible
   - interrupts

-- 
2.51.0


^ permalink raw reply related

* Re: [PATCH v3 2/3] arm64: dts: mediatek: mt8395-nio-12l: add PMIC and GPIO keys support
From: Matthias Brugger @ 2025-09-09 12:47 UTC (permalink / raw)
  To: Julien Massot, kernel, Dmitry Torokhov,
	AngeloGioacchino Del Regno, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Louis-Alexis Eyraud
  Cc: linux-input, linux-kernel, linux-arm-kernel, linux-mediatek,
	devicetree
In-Reply-To: <20250905-radxa-nio-12-l-gpio-v3-2-40f11377fb55@collabora.com>



On 05/09/2025 13:51, Julien Massot wrote:
> Add support for PMIC and GPIO keys on the Radxa NIO 12L board:
> Declare a gpio-keys node for the Volume Up button using GPIO106.
> Add the corresponding pin configuration in the pinctrl node.
> Add a mediatek,mt6359-keys subnode under the PMIC to handle the
> power and home buttons exposed by the MT6359.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Julien Massot <julien.massot@collabora.com>

Queued, thanks.
Matthias

> ---
>   .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts     | 36 ++++++++++++++++++++++
>   1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> index 329c60cc6a6be0b4be8c0b8bb033b32d35302804..fd596e2298285361ad7c2fb828feec598d75a73e 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
> @@ -8,6 +8,7 @@
>   #include "mt8195.dtsi"
>   #include "mt6359.dtsi"
>   #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>   #include <dt-bindings/interrupt-controller/irq.h>
>   #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
>   #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
> @@ -60,6 +61,18 @@ backlight: backlight {
>   		status = "disabled";
>   	};
>   
> +	keys: gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		button-volume-up {
> +			wakeup-source;
> +			debounce-interval = <100>;
> +			gpios = <&pio 106 GPIO_ACTIVE_LOW>;
> +			label = "volume_up";
> +			linux,code = <KEY_VOLUMEUP>;
> +		};
> +	};
> +
>   	wifi_vreg: regulator-wifi-3v3-en {
>   		compatible = "regulator-fixed";
>   		regulator-name = "wifi_3v3_en";
> @@ -626,6 +639,14 @@ pins-txd {
>   		};
>   	};
>   
> +	gpio_key_pins: gpio-keys-pins {
> +		pins {
> +			pinmux = <PINMUX_GPIO106__FUNC_GPIO106>;
> +			bias-pull-up;
> +			input-enable;
> +		};
> +	};
> +
>   	i2c2_pins: i2c2-pins {
>   		pins-bus {
>   			pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
> @@ -880,6 +901,21 @@ &pciephy {
>   
>   &pmic {
>   	interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
> +
> +	mt6359keys: keys {
> +		compatible = "mediatek,mt6359-keys";
> +		mediatek,long-press-mode = <1>;
> +		power-off-time-sec = <0>;
> +
> +		power-key {
> +			linux,keycodes = <KEY_POWER>;
> +			wakeup-source;
> +		};
> +
> +		home {
> +			linux,keycodes = <KEY_HOME>;
> +		};
> +	};
>   };
>   
>   &scp {
> 


^ permalink raw reply

* [dtor-input:next] BUILD SUCCESS 8742bebb846009af7a22e489fe99aced5e195b51
From: kernel test robot @ 2025-09-09 11:14 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
branch HEAD: 8742bebb846009af7a22e489fe99aced5e195b51  Input: synaptics-rmi4 - add includes for types used in rmi_2d_sensor.h

elapsed time: 1241m

configs tested: 120
configs skipped: 3

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alpha                             allnoconfig    gcc-15.1.0
alpha                            allyesconfig    gcc-15.1.0
alpha                               defconfig    gcc-15.1.0
arc                              allmodconfig    gcc-15.1.0
arc                               allnoconfig    gcc-15.1.0
arc                              allyesconfig    gcc-15.1.0
arc                   randconfig-001-20250909    gcc-8.5.0
arc                   randconfig-002-20250909    gcc-8.5.0
arm                              allmodconfig    gcc-15.1.0
arm                               allnoconfig    clang-22
arm                              allyesconfig    gcc-15.1.0
arm                            dove_defconfig    gcc-15.1.0
arm                         lpc32xx_defconfig    clang-17
arm                   randconfig-001-20250909    clang-18
arm                   randconfig-002-20250909    clang-17
arm                   randconfig-003-20250909    clang-22
arm                   randconfig-004-20250909    clang-19
arm                         s3c6400_defconfig    gcc-15.1.0
arm64                            allmodconfig    clang-19
arm64                             allnoconfig    gcc-15.1.0
arm64                 randconfig-001-20250909    clang-16
arm64                 randconfig-002-20250909    gcc-11.5.0
arm64                 randconfig-003-20250909    gcc-11.5.0
arm64                 randconfig-004-20250909    clang-22
csky                              allnoconfig    gcc-15.1.0
csky                  randconfig-001-20250909    gcc-15.1.0
csky                  randconfig-002-20250909    gcc-15.1.0
hexagon                          allmodconfig    clang-17
hexagon                           allnoconfig    clang-22
hexagon                          allyesconfig    clang-22
hexagon               randconfig-001-20250909    clang-22
hexagon               randconfig-002-20250909    clang-22
i386                             allmodconfig    gcc-14
i386                              allnoconfig    gcc-14
i386                             allyesconfig    gcc-14
i386        buildonly-randconfig-001-20250908    gcc-14
i386        buildonly-randconfig-002-20250908    gcc-14
i386        buildonly-randconfig-003-20250908    gcc-12
i386        buildonly-randconfig-004-20250908    gcc-14
i386        buildonly-randconfig-005-20250908    clang-20
i386        buildonly-randconfig-006-20250908    clang-20
i386                                defconfig    clang-20
loongarch                        allmodconfig    clang-19
loongarch                         allnoconfig    clang-22
loongarch             randconfig-001-20250909    gcc-15.1.0
loongarch             randconfig-002-20250909    gcc-15.1.0
m68k                             allmodconfig    gcc-15.1.0
m68k                              allnoconfig    gcc-15.1.0
m68k                             allyesconfig    gcc-15.1.0
microblaze                       allmodconfig    gcc-15.1.0
microblaze                        allnoconfig    gcc-15.1.0
microblaze                       allyesconfig    gcc-15.1.0
microblaze                          defconfig    gcc-15.1.0
microblaze                      mmu_defconfig    gcc-15.1.0
mips                              allnoconfig    gcc-15.1.0
mips                     loongson1b_defconfig    clang-22
nios2                             allnoconfig    gcc-11.5.0
nios2                               defconfig    gcc-11.5.0
nios2                 randconfig-001-20250909    gcc-11.5.0
nios2                 randconfig-002-20250909    gcc-8.5.0
openrisc                          allnoconfig    gcc-15.1.0
openrisc                         allyesconfig    gcc-15.1.0
parisc                           allmodconfig    gcc-15.1.0
parisc                            allnoconfig    gcc-15.1.0
parisc                           allyesconfig    gcc-15.1.0
parisc                              defconfig    gcc-15.1.0
parisc                randconfig-001-20250909    gcc-8.5.0
parisc                randconfig-002-20250909    gcc-12.5.0
parisc64                            defconfig    gcc-15.1.0
powerpc                          allmodconfig    gcc-15.1.0
powerpc                           allnoconfig    gcc-15.1.0
powerpc                          allyesconfig    clang-22
powerpc                     ep8248e_defconfig    gcc-15.1.0
powerpc               randconfig-001-20250909    clang-22
powerpc               randconfig-002-20250909    clang-17
powerpc               randconfig-003-20250909    gcc-8.5.0
powerpc                     taishan_defconfig    clang-17
powerpc64             randconfig-001-20250909    clang-20
powerpc64             randconfig-002-20250909    gcc-10.5.0
powerpc64             randconfig-003-20250909    gcc-8.5.0
riscv                            allmodconfig    clang-22
riscv                             allnoconfig    gcc-15.1.0
riscv                            allyesconfig    clang-16
riscv                 randconfig-001-20250908    gcc-11.5.0
riscv                 randconfig-002-20250908    gcc-13.4.0
s390                             allmodconfig    clang-18
s390                              allnoconfig    clang-22
s390                             allyesconfig    gcc-15.1.0
s390                  randconfig-001-20250908    clang-22
s390                  randconfig-002-20250908    gcc-12.5.0
sh                               allmodconfig    gcc-15.1.0
sh                                allnoconfig    gcc-15.1.0
sh                               allyesconfig    gcc-15.1.0
sh                    randconfig-001-20250908    gcc-14.3.0
sh                    randconfig-002-20250908    gcc-14.3.0
sparc                            allmodconfig    gcc-15.1.0
sparc                             allnoconfig    gcc-15.1.0
sparc                               defconfig    gcc-15.1.0
sparc                 randconfig-001-20250908    gcc-8.5.0
sparc                 randconfig-002-20250908    gcc-12.5.0
sparc64               randconfig-001-20250908    gcc-13.4.0
sparc64               randconfig-002-20250908    gcc-8.5.0
um                               allmodconfig    clang-19
um                                allnoconfig    clang-22
um                               allyesconfig    gcc-14
um                    randconfig-001-20250908    gcc-14
um                    randconfig-002-20250908    clang-22
x86_64                            allnoconfig    clang-20
x86_64                           allyesconfig    clang-20
x86_64      buildonly-randconfig-001-20250908    clang-20
x86_64      buildonly-randconfig-002-20250908    gcc-14
x86_64      buildonly-randconfig-003-20250908    gcc-14
x86_64      buildonly-randconfig-004-20250908    gcc-14
x86_64      buildonly-randconfig-005-20250908    gcc-14
x86_64      buildonly-randconfig-006-20250908    clang-20
x86_64                              defconfig    gcc-14
x86_64                          rhel-9.4-rust    clang-20
xtensa                            allnoconfig    gcc-15.1.0
xtensa                randconfig-001-20250908    gcc-9.5.0
xtensa                randconfig-002-20250908    gcc-11.5.0

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* [PATCH] HID: i2c-hid: Resolve touchpad issues on Dell systems during S4
From: Mario Limonciello (AMD) @ 2025-09-09 11:00 UTC (permalink / raw)
  To: mario.limonciello, jikos, bentiss; +Cc: Mario Limonciello (AMD), linux-input

Dell systems utilize an EC-based touchpad emulation when the ACPI
touchpad _DSM is not invoked. This emulation acts as a secondary
master on the I2C bus, designed for scenarios where the I2C touchpad
driver is absent, such as in BIOS menus. Typically, loading the
i2c-hid module triggers the _DSM at initialization, disabling the
EC-based emulation.

However, if the i2c-hid module is missing from the boot kernel
used for hibernation snapshot restoration, the _DSM remains
uncalled, resulting in dual masters on the I2C bus and
subsequent arbitration errors. This issue arises when i2c-hid
resides in the rootfs instead of the kernel or initramfs.

To address this, switch from using the SYSTEM_SLEEP_PM_OPS()
macro to dedicated callbacks, introducing a specific
callback for restoring the S4 image. This callback ensures
the _DSM is invoked.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
 drivers/hid/i2c-hid/i2c-hid-acpi.c |  8 ++++++++
 drivers/hid/i2c-hid/i2c-hid-core.c | 28 +++++++++++++++++++++++++++-
 drivers/hid/i2c-hid/i2c-hid.h      |  2 ++
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
index 1b49243adb16a..abd700a101f46 100644
--- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -76,6 +76,13 @@ static int i2c_hid_acpi_get_descriptor(struct i2c_hid_acpi *ihid_acpi)
 	return hid_descriptor_address;
 }
 
+static void i2c_hid_acpi_restore_sequence(struct i2chid_ops *ops)
+{
+	struct i2c_hid_acpi *ihid_acpi = container_of(ops, struct i2c_hid_acpi, ops);
+
+	i2c_hid_acpi_get_descriptor(ihid_acpi);
+}
+
 static void i2c_hid_acpi_shutdown_tail(struct i2chid_ops *ops)
 {
 	struct i2c_hid_acpi *ihid_acpi = container_of(ops, struct i2c_hid_acpi, ops);
@@ -96,6 +103,7 @@ static int i2c_hid_acpi_probe(struct i2c_client *client)
 
 	ihid_acpi->adev = ACPI_COMPANION(dev);
 	ihid_acpi->ops.shutdown_tail = i2c_hid_acpi_shutdown_tail;
+	ihid_acpi->ops.restore_sequence = i2c_hid_acpi_restore_sequence;
 
 	ret = i2c_hid_acpi_get_descriptor(ihid_acpi);
 	if (ret < 0)
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index d3912e3f2f13a..3257aa87be898 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -961,6 +961,14 @@ static void i2c_hid_core_shutdown_tail(struct i2c_hid *ihid)
 	ihid->ops->shutdown_tail(ihid->ops);
 }
 
+static void i2c_hid_core_restore_sequence(struct i2c_hid *ihid)
+{
+	if (!ihid->ops->restore_sequence)
+		return;
+
+	ihid->ops->restore_sequence(ihid->ops);
+}
+
 static int i2c_hid_core_suspend(struct i2c_hid *ihid, bool force_poweroff)
 {
 	struct i2c_client *client = ihid->client;
@@ -1360,8 +1368,26 @@ static int i2c_hid_core_pm_resume(struct device *dev)
 	return i2c_hid_core_resume(ihid);
 }
 
+static int i2c_hid_core_pm_restore(struct device *dev)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct i2c_hid *ihid = i2c_get_clientdata(client);
+
+	if (ihid->is_panel_follower)
+		return 0;
+
+	i2c_hid_core_restore_sequence(ihid);
+
+	return i2c_hid_core_resume(ihid);
+}
+
 const struct dev_pm_ops i2c_hid_core_pm = {
-	SYSTEM_SLEEP_PM_OPS(i2c_hid_core_pm_suspend, i2c_hid_core_pm_resume)
+	.suspend = pm_sleep_ptr(i2c_hid_core_pm_suspend),
+	.resume = pm_sleep_ptr(i2c_hid_core_pm_resume),
+	.freeze = pm_sleep_ptr(i2c_hid_core_pm_suspend),
+	.thaw = pm_sleep_ptr(i2c_hid_core_pm_resume),
+	.poweroff = pm_sleep_ptr(i2c_hid_core_pm_suspend),
+	.restore = pm_sleep_ptr(i2c_hid_core_pm_restore),
 };
 EXPORT_SYMBOL_GPL(i2c_hid_core_pm);
 
diff --git a/drivers/hid/i2c-hid/i2c-hid.h b/drivers/hid/i2c-hid/i2c-hid.h
index 2c7b66d5caa0f..1724a435c783a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.h
+++ b/drivers/hid/i2c-hid/i2c-hid.h
@@ -27,11 +27,13 @@ static inline u32 i2c_hid_get_dmi_quirks(const u16 vendor, const u16 product)
  * @power_up: do sequencing to power up the device.
  * @power_down: do sequencing to power down the device.
  * @shutdown_tail: called at the end of shutdown.
+ * @restore_sequence: hibernation restore sequence.
  */
 struct i2chid_ops {
 	int (*power_up)(struct i2chid_ops *ops);
 	void (*power_down)(struct i2chid_ops *ops);
 	void (*shutdown_tail)(struct i2chid_ops *ops);
+	void (*restore_sequence)(struct i2chid_ops *ops);
 };
 
 int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH v1 13/14] dt-bindings: input/touchscreen: Convert MELFAS MIP4 Touchscreen to YAML
From: Krzysztof Kozlowski @ 2025-09-09  6:56 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov
  Cc: Ariel D'Alessandro, airlied, amergnat, andrew+netdev,
	andrew-ct.chen, angelogioacchino.delregno, broonie, chunkuang.hu,
	ck.hu, conor+dt, davem, edumazet, flora.fu, houlong.wei, jeesw,
	jmassot, kernel, krzk+dt, kuba, kyrie.wu, lgirdwood,
	louisalexis.eyraud, maarten.lankhorst, matthias.bgg, mchehab,
	minghsiu.tsai, mripard, p.zabel, pabeni, robh, sean.wang, simona,
	support.opensource, tiffany.lin, tzimmermann, yunfei.dong,
	devicetree, dri-devel, linux-arm-kernel, linux-clk, linux-gpio,
	linux-input, linux-kernel, linux-media, linux-mediatek,
	linux-sound, netdev
In-Reply-To: <CACRpkdZRHQ6vuchN8x8d0uPCVMPPHOdBVWiUhzFJNs2paHGbYw@mail.gmail.com>

On 05/09/2025 13:33, Linus Walleij wrote:
> On Fri, Sep 5, 2025 at 12:02 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>> On Thu, Aug 21, 2025 at 01:56:24PM +0200, Linus Walleij wrote:
>>> Hi Ariel,
>>>
>>> thanks for your patch!
>>>
>>> On Wed, Aug 20, 2025 at 7:17 PM Ariel D'Alessandro
>>> <ariel.dalessandro@collabora.com> wrote:
>>>
>>>> +  ce-gpios:
>>>> +    description: GPIO connected to the CE (chip enable) pin of the chip
>>>> +    maxItems: 1
>>>
>>> Mention that this should always have the flag GPIO_ACTIVE_HIGH
>>> as this is required by the hardware.
>>>
>>> Unfortunately we have no YAML syntax for enforcing flags :/
>>
>> Theoretically there can be an inverter on the line, so from the AP point
>> of view the line is active low while from the peripheral POV the pin is
>> active high...
> 
> Yes, I think someone even proposed adding inverters to the
> device tree and was nixed.

It's not about DT, it's about board design - you can (almost?) always
invert the logical signal, so this should match what hardware requires
plus any inverter on the board.


> 
> It's a matter of phrasing I would say:
> 
> "Mention that this should nominally have the flag GPIO_ACTIVE_HIGH

No, please do not, it is wrong. If hardware requires active high, then
just say this is active high. But the actual GPIO flag depends on the
board design if signal is inverted.


Best regards,
Krzysztof

^ 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