* [PATCH 0/2] st1232: Add wakeup-source support
@ 2026-03-05 11:35 phucduc.bui
2026-03-05 11:35 ` [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-05 11:35 UTC (permalink / raw)
To: dmitry.torokhov, robh, krzk+dt, conor+dt, geert+renesas,
magnus.damm
Cc: javier.carrasco, hechtb, wsa+renesas, linux-input, devicetree,
linux-renesas-soc, linux-kernel, phucduc.bui
From: bui duc phuc <phucduc.bui@gmail.com>
This patch series adds support for using the Sitronix ST1232
touchscreen as a wakeup source on the Armadillo800EVA board.
Patch 1 documents the generic wakeup-source property in the
Devicetree binding for the ST1232 touchscreen controller.
Patch 2 enables the wakeup-source property in the ST1232
touchscreen node for the Armadillo800EVA board, allowing touch
events to wake the system from suspend.
This series depends on the following patch which has been
submitted but not yet merged:
drm: shmobile: Fix blank screen after resume when LCDC is stopped
Link: https://lore.kernel.org/all/20260226054035.30330-1-phucduc.bui@gmail.com/
bui duc phuc (2):
dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to
st1232
.../bindings/input/touchscreen/sitronix,st1232.yaml | 5 +++++
arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts | 1 +
2 files changed, 6 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-05 11:35 [PATCH 0/2] st1232: Add wakeup-source support phucduc.bui
@ 2026-03-05 11:35 ` phucduc.bui
2026-03-06 8:18 ` Krzysztof Kozlowski
2026-03-05 11:35 ` [PATCH 2/2] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
2 siblings, 1 reply; 19+ messages in thread
From: phucduc.bui @ 2026-03-05 11:35 UTC (permalink / raw)
To: dmitry.torokhov, robh, krzk+dt, conor+dt, geert+renesas,
magnus.damm
Cc: javier.carrasco, hechtb, wsa+renesas, linux-input, devicetree,
linux-renesas-soc, linux-kernel, phucduc.bui
From: bui duc phuc <phucduc.bui@gmail.com>
Document the 'wakeup-source' property for Sitronix ST1232 touchscreen
controllers to allow the device to wake the system from suspend.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
.../bindings/input/touchscreen/sitronix,st1232.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
index 978afaa4fcef..672544e5a26e 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
@@ -32,6 +32,10 @@ properties:
description: A phandle to the reset GPIO
maxItems: 1
+ wakeup-source:
+ description: Device can be used as a wakeup source.
+ type: boolean
+
required:
- compatible
- reg
@@ -51,6 +55,7 @@ examples:
reg = <0x55>;
interrupts = <2 0>;
gpios = <&gpio1 166 0>;
+ wakeup-source;
touch-overlay {
segment-0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/2] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232
2026-03-05 11:35 [PATCH 0/2] st1232: Add wakeup-source support phucduc.bui
2026-03-05 11:35 ` [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
@ 2026-03-05 11:35 ` phucduc.bui
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
2 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-05 11:35 UTC (permalink / raw)
To: dmitry.torokhov, robh, krzk+dt, conor+dt, geert+renesas,
magnus.damm
Cc: javier.carrasco, hechtb, wsa+renesas, linux-input, devicetree,
linux-renesas-soc, linux-kernel, phucduc.bui
From: bui duc phuc <phucduc.bui@gmail.com>
Add the wakeup-source property to the ST1232 touchscreen node
in the device tree so that the touchscreen interrupt can wake
the system from suspend when the panel is touched.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
index 04d24b6d8056..d47a6cc3e756 100644
--- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
@@ -228,6 +228,7 @@ touchscreen@55 {
pinctrl-0 = <&st1232_pins>;
pinctrl-names = "default";
gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-05 11:35 ` [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
@ 2026-03-06 8:18 ` Krzysztof Kozlowski
2026-03-06 10:24 ` phucduc.bui
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-06 8:18 UTC (permalink / raw)
To: phucduc.bui
Cc: dmitry.torokhov, robh, krzk+dt, conor+dt, geert+renesas,
magnus.damm, javier.carrasco, hechtb, wsa+renesas, linux-input,
devicetree, linux-renesas-soc, linux-kernel
On Thu, Mar 05, 2026 at 06:35:11PM +0700, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> Document the 'wakeup-source' property for Sitronix ST1232 touchscreen
> controllers to allow the device to wake the system from suspend.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> .../bindings/input/touchscreen/sitronix,st1232.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
> index 978afaa4fcef..672544e5a26e 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
> @@ -32,6 +32,10 @@ properties:
> description: A phandle to the reset GPIO
> maxItems: 1
>
> + wakeup-source:
> + description: Device can be used as a wakeup source.
Drop description
> + type: boolean
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-06 8:18 ` Krzysztof Kozlowski
@ 2026-03-06 10:24 ` phucduc.bui
0 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 10:24 UTC (permalink / raw)
To: krzk
Cc: conor+dt, devicetree, dmitry.torokhov, geert+renesas, hechtb,
javier.carrasco, krzk+dt, linux-input, linux-kernel,
linux-renesas-soc, magnus.damm, phucduc.bui, robh, wsa+renesas
Hi Krzysztof,
Thank you for your review. I will drop the description for the
'wakeup-source' property and send the v2 series shortly.
Best regards,
Phuc
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 0/3] Input: st1232 - add system wakeup support
2026-03-05 11:35 [PATCH 0/2] st1232: Add wakeup-source support phucduc.bui
2026-03-05 11:35 ` [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-05 11:35 ` [PATCH 2/2] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
@ 2026-03-06 10:40 ` phucduc.bui
2026-03-06 10:40 ` [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
` (3 more replies)
2 siblings, 4 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 10:40 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This patch series adds system wakeup support for the ST1232 touchscreen
controller.
During development it was observed that the device did not expose the
"power/wakeup" sysfs attribute, preventing it from being configured as
a wakeup source for system suspend.
To address this, the Devicetree node for the touchscreen is updated to
include the "wakeup-source" property, and the st1232 driver is extended
to initialize the device wakeup capability and report wakeup events
to the PM core.
## Testing
The changes were tested on the
Armadillo800EVA board based on the Renesas R8A7740 SoC.
The system successfully resumes from suspend when the LCD panel is
touched.
Due to the interrupt hierarchy on this platform, the parent interrupt
controller (GIC, IRQ 24) is recorded as the primary source that wakes
the SoC, followed by the device interrupt (IRQ 35).
Example kernel log during wakeup:
PM: suspend-to-idle
PM: Triggering wakeup from IRQ 24
PM: Triggering wakeup from IRQ 35
## Verified functionality
* The "power/wakeup" sysfs attribute is present for the device.
* The system resumes correctly from 'mem' and 'freeze' states when the
touchscreen is touched.
## Changes in v2
* Drop description for wakeup-source property as suggested by
Krzysztof Kozlowski.
* Updated commit messages for clarity.
* Added driver-side wakeup handling in st1232.c.
## Patch series
1. dt-bindings: input: touchscreen: st1232: document wakeup-source
2. arm: dts: r8a7740: armadillo800eva: add wakeup-source to st1232
3. Input: st1232: add wakeup support
Feedback and review are welcome.
bui duc phuc (3):
dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to
st1232
input: touchscreen: st1232: add system wakeup support
.../input/touchscreen/sitronix,st1232.yaml | 4 +++
.../dts/renesas/r8a7740-armadillo800eva.dts | 1 +
drivers/input/touchscreen/st1232.c | 27 +++++++++++++++----
3 files changed, 27 insertions(+), 5 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
@ 2026-03-06 10:40 ` phucduc.bui
2026-03-06 10:42 ` Krzysztof Kozlowski
2026-03-06 10:40 ` [PATCH v2 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 10:40 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc,
Krzysztof Kozlowski
From: bui duc phuc <phucduc.bui@gmail.com>
Document the 'wakeup-source' property for Sitronix ST1232 touchscreen
controllers to allow the device to wake the system from suspend.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Changes in v2:
- Drop redundant description for wakeup-source property as requested
by Krzysztof Kozlowski.
.../bindings/input/touchscreen/sitronix,st1232.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
index 978afaa4fcef..fe1fa217d842 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
@@ -32,6 +32,9 @@ properties:
description: A phandle to the reset GPIO
maxItems: 1
+ wakeup-source:
+ type: boolean
+
required:
- compatible
- reg
@@ -51,6 +54,7 @@ examples:
reg = <0x55>;
interrupts = <2 0>;
gpios = <&gpio1 166 0>;
+ wakeup-source;
touch-overlay {
segment-0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
2026-03-06 10:40 ` [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
@ 2026-03-06 10:40 ` phucduc.bui
2026-03-06 10:40 ` [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
3 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 10:40 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Add the wakeup-source property to the ST1232 touchscreen node
in the device tree so that the touchscreen interrupt can wake
the system from suspend when the panel is touched.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
index 04d24b6d8056..d47a6cc3e756 100644
--- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
@@ -228,6 +228,7 @@ touchscreen@55 {
pinctrl-0 = <&st1232_pins>;
pinctrl-names = "default";
gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
2026-03-06 10:40 ` [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-06 10:40 ` [PATCH v2 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
@ 2026-03-06 10:40 ` phucduc.bui
2026-03-06 10:44 ` Krzysztof Kozlowski
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
3 siblings, 1 reply; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 10:40 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The ST1232 touchscreen controller can generate an interrupt when the
panel is touched, which may be used as a wakeup source for the system.
Add support for system wakeup by initializing the device wakeup
capability in probe() based on the "wakeup-source" device property.
When wakeup is enabled, the driver enables IRQ wake during suspend
so that touch events can wake the system.
Additionally, report wakeup events from the interrupt handler when
the device is allowed to wake the system. This allows the PM core to
track touch-generated wakeup events and helps avoid potential races
with system suspend.
If wakeup is not enabled, the driver retains the existing behavior of
disabling the IRQ and powering down the controller during suspend.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/input/touchscreen/st1232.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 9b3901eec0a5..2bab06cf099b 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -183,6 +183,9 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
int count;
int error;
+ if (device_may_wakeup(&ts->client->dev))
+ pm_wakeup_event(&ts->client->dev, 0);
+
error = st1232_ts_read_data(ts, REG_XY_COORDINATES, ts->read_buf_len);
if (error)
goto out;
@@ -356,6 +359,9 @@ static int st1232_ts_probe(struct i2c_client *client)
i2c_set_clientdata(client, ts);
+ device_init_wakeup(&client->dev,
+ device_property_read_bool(&client->dev, "wakeup-source"));
+
return 0;
}
@@ -363,11 +369,20 @@ static int st1232_ts_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct st1232_ts_data *ts = i2c_get_clientdata(client);
+ int ret;
- disable_irq(client->irq);
+ dev_info(dev, "st1232: suspend called\n");
+ dev_info(dev, "st1232: irq=%d wakeup=%d\n", client->irq, device_may_wakeup(dev));
- if (!device_may_wakeup(&client->dev))
+ if (device_may_wakeup(dev)) {
+ ret = enable_irq_wake(client->irq);
+ dev_info(dev, "st1232: Supend use wakeup\n");
+ dev_info(dev, "enable_irq_wake ret=%d\n", ret);
+ } else {
+ dev_info(dev, "st1232: Suspend Don't use wakeup\n");
+ disable_irq(client->irq);
st1232_ts_power(ts, false);
+ }
return 0;
}
@@ -377,10 +392,12 @@ static int st1232_ts_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct st1232_ts_data *ts = i2c_get_clientdata(client);
- if (!device_may_wakeup(&client->dev))
+ if (device_may_wakeup(dev)) {
+ disable_irq_wake(client->irq);
+ } else {
st1232_ts_power(ts, true);
-
- enable_irq(client->irq);
+ enable_irq(client->irq);
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-06 10:40 ` [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
@ 2026-03-06 10:42 ` Krzysztof Kozlowski
2026-03-07 2:46 ` phucduc.bui
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-06 10:42 UTC (permalink / raw)
To: phucduc.bui, Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, Krzysztof Kozlowski
On 06/03/2026 11:40, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> Document the 'wakeup-source' property for Sitronix ST1232 touchscreen
> controllers to allow the device to wake the system from suspend.
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>
Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support
2026-03-06 10:40 ` [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
@ 2026-03-06 10:44 ` Krzysztof Kozlowski
2026-03-07 2:50 ` phucduc.bui
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-06 10:44 UTC (permalink / raw)
To: phucduc.bui, Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel
On 06/03/2026 11:40, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> The ST1232 touchscreen controller can generate an interrupt when the
> panel is touched, which may be used as a wakeup source for the system.
>
> Add support for system wakeup by initializing the device wakeup
> capability in probe() based on the "wakeup-source" device property.
> When wakeup is enabled, the driver enables IRQ wake during suspend
> so that touch events can wake the system.
>
> Additionally, report wakeup events from the interrupt handler when
> the device is allowed to wake the system. This allows the PM core to
> track touch-generated wakeup events and helps avoid potential races
> with system suspend.
>
> If wakeup is not enabled, the driver retains the existing behavior of
> disabling the IRQ and powering down the controller during suspend.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> drivers/input/touchscreen/st1232.c | 27 ++++++++++++++++++++++-----
> 1 file changed, 22 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
> index 9b3901eec0a5..2bab06cf099b 100644
> --- a/drivers/input/touchscreen/st1232.c
> +++ b/drivers/input/touchscreen/st1232.c
> @@ -183,6 +183,9 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
> int count;
> int error;
>
> + if (device_may_wakeup(&ts->client->dev))
> + pm_wakeup_event(&ts->client->dev, 0);
> +
> error = st1232_ts_read_data(ts, REG_XY_COORDINATES, ts->read_buf_len);
> if (error)
> goto out;
> @@ -356,6 +359,9 @@ static int st1232_ts_probe(struct i2c_client *client)
>
> i2c_set_clientdata(client, ts);
>
> + device_init_wakeup(&client->dev,
> + device_property_read_bool(&client->dev, "wakeup-source"));
> +
> return 0;
> }
>
> @@ -363,11 +369,20 @@ static int st1232_ts_suspend(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> struct st1232_ts_data *ts = i2c_get_clientdata(client);
> + int ret;
>
> - disable_irq(client->irq);
> + dev_info(dev, "st1232: suspend called\n");
> + dev_info(dev, "st1232: irq=%d wakeup=%d\n", client->irq, device_may_wakeup(dev));
No, there is no need to add success messages.
>
> - if (!device_may_wakeup(&client->dev))
> + if (device_may_wakeup(dev)) {
> + ret = enable_irq_wake(client->irq);
> + dev_info(dev, "st1232: Supend use wakeup\n");
> + dev_info(dev, "enable_irq_wake ret=%d\n", ret);
Drop both
> + } else {
> + dev_info(dev, "st1232: Suspend Don't use wakeup\n");
Drop
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 0/3] Input: st1232 - add system wakeup support
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
` (2 preceding siblings ...)
2026-03-06 10:40 ` [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
@ 2026-03-06 11:19 ` phucduc.bui
2026-03-06 11:19 ` [PATCH v3 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
` (3 more replies)
3 siblings, 4 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 11:19 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This patch series adds system wakeup support for the ST1232 touchscreen
controller.
During development it was observed that the device did not expose the
"power/wakeup" sysfs attribute, preventing it from being configured as
a wakeup source for system suspend.
To address this, the Devicetree node for the touchscreen is updated to
include the "wakeup-source" property, and the st1232 driver is extended
to initialize the device wakeup capability and report wakeup events
to the PM core.
Testing
The changes were tested on the
Armadillo800EVA board based on the Renesas R8A7740 SoC.
The system successfully resumes from suspend when the LCD panel is
touched.
Due to the interrupt hierarchy on this platform, the parent interrupt
controller (GIC, IRQ 24) is recorded as the primary source that wakes
the SoC, followed by the device interrupt (IRQ 35).
Example kernel log during wakeup:
PM: suspend-to-idle
PM: Triggering wakeup from IRQ 24
PM: Triggering wakeup from IRQ 35
Verified functionality
* The "power/wakeup" sysfs attribute is present for the device.
* The system resumes correctly from 'mem' and 'freeze' states when the
touchscreen is touched.
Changes in v3:
* Patch 3: Removed debug dev_info() log messages for a cleaner
production-ready implementation.
* No changes to Patch 1 and Patch 2.
Changes in v2
* Drop description for wakeup-source property as suggested by
Krzysztof Kozlowski.
* Updated commit messages for clarity.
* Added driver-side wakeup handling in st1232.c.
Patch series
1. dt-bindings: input: touchscreen: st1232: document wakeup-source
2. arm: dts: r8a7740: armadillo800eva: add wakeup-source to st1232
3. Input: st1232: add wakeup support
This series depends on the following patch which has been
submitted but not yet merged:
drm: shmobile: Fix blank screen after resume when LCDC is stopped
Link: https://lore.kernel.org/all/20260226054035.30330-1-phucduc.bui@gmail.com/
Feedback and review are welcome.
bui duc phuc (3):
dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to
st1232
input: touchscreen: st1232: add system wakeup support
.../input/touchscreen/sitronix,st1232.yaml | 4 ++++
.../dts/renesas/r8a7740-armadillo800eva.dts | 1 +
drivers/input/touchscreen/st1232.c | 22 ++++++++++++++-----
3 files changed, 21 insertions(+), 6 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
@ 2026-03-06 11:19 ` phucduc.bui
2026-03-06 11:19 ` [PATCH v3 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 11:19 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc,
Krzysztof Kozlowski
From: bui duc phuc <phucduc.bui@gmail.com>
Document the 'wakeup-source' property for Sitronix ST1232 touchscreen
controllers to allow the device to wake the system from suspend.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
.../bindings/input/touchscreen/sitronix,st1232.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
index 978afaa4fcef..fe1fa217d842 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
@@ -32,6 +32,9 @@ properties:
description: A phandle to the reset GPIO
maxItems: 1
+ wakeup-source:
+ type: boolean
+
required:
- compatible
- reg
@@ -51,6 +54,7 @@ examples:
reg = <0x55>;
interrupts = <2 0>;
gpios = <&gpio1 166 0>;
+ wakeup-source;
touch-overlay {
segment-0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
2026-03-06 11:19 ` [PATCH v3 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
@ 2026-03-06 11:19 ` phucduc.bui
2026-03-06 11:19 ` [PATCH v3 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
2026-03-06 11:49 ` [PATCH v3 0/3] Input: st1232 - " Wolfram Sang
3 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 11:19 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Add the wakeup-source property to the ST1232 touchscreen node
in the device tree so that the touchscreen interrupt can wake
the system from suspend when the panel is touched.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
index 04d24b6d8056..d47a6cc3e756 100644
--- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
@@ -228,6 +228,7 @@ touchscreen@55 {
pinctrl-0 = <&st1232_pins>;
pinctrl-names = "default";
gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 3/3] input: touchscreen: st1232: add system wakeup support
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
2026-03-06 11:19 ` [PATCH v3 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-06 11:19 ` [PATCH v3 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
@ 2026-03-06 11:19 ` phucduc.bui
2026-03-06 11:49 ` [PATCH v3 0/3] Input: st1232 - " Wolfram Sang
3 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-06 11:19 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Wolfram Sang, Jeff LaBundy,
Bastian Hecht, Javier Carrasco, linux-input, devicetree,
linux-renesas-soc, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The ST1232 touchscreen controller can generate an interrupt when the
panel is touched, which may be used as a wakeup source for the system.
Add support for system wakeup by initializing the device wakeup
capability in probe() based on the "wakeup-source" device property.
When wakeup is enabled, the driver enables IRQ wake during suspend
so that touch events can wake the system.
If wakeup is not enabled, the driver retains the existing behavior of
disabling the IRQ and powering down the controller during suspend.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Changes in v3:
- Remove debug dev_info() messages to clean up the code and comply with
upstream coding standards.
drivers/input/touchscreen/st1232.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 9b3901eec0a5..8fce17d8bdc0 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -183,6 +183,9 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
int count;
int error;
+ if (device_may_wakeup(&ts->client->dev))
+ pm_wakeup_event(&ts->client->dev, 0);
+
error = st1232_ts_read_data(ts, REG_XY_COORDINATES, ts->read_buf_len);
if (error)
goto out;
@@ -356,6 +359,9 @@ static int st1232_ts_probe(struct i2c_client *client)
i2c_set_clientdata(client, ts);
+ device_init_wakeup(&client->dev,
+ device_property_read_bool(&client->dev, "wakeup-source"));
+
return 0;
}
@@ -364,10 +370,12 @@ static int st1232_ts_suspend(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct st1232_ts_data *ts = i2c_get_clientdata(client);
- disable_irq(client->irq);
-
- if (!device_may_wakeup(&client->dev))
+ if (device_may_wakeup(dev)) {
+ enable_irq_wake(client->irq);
+ } else {
+ disable_irq(client->irq);
st1232_ts_power(ts, false);
+ }
return 0;
}
@@ -377,10 +385,12 @@ static int st1232_ts_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct st1232_ts_data *ts = i2c_get_clientdata(client);
- if (!device_may_wakeup(&client->dev))
+ if (device_may_wakeup(dev)) {
+ disable_irq_wake(client->irq);
+ } else {
st1232_ts_power(ts, true);
-
- enable_irq(client->irq);
+ enable_irq(client->irq);
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v3 0/3] Input: st1232 - add system wakeup support
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
` (2 preceding siblings ...)
2026-03-06 11:19 ` [PATCH v3 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
@ 2026-03-06 11:49 ` Wolfram Sang
2026-03-07 2:53 ` phucduc.bui
3 siblings, 1 reply; 19+ messages in thread
From: Wolfram Sang @ 2026-03-06 11:49 UTC (permalink / raw)
To: phucduc.bui
Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Jeff LaBundy, Bastian Hecht,
Javier Carrasco, linux-input, devicetree, linux-renesas-soc,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
Krzysztof already adviced you to not attach new series to old threads.
Please follow this suggestion:
Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source
2026-03-06 10:42 ` Krzysztof Kozlowski
@ 2026-03-07 2:46 ` phucduc.bui
0 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-07 2:46 UTC (permalink / raw)
To: krzk
Cc: conor+dt, devicetree, dmitry.torokhov, geert+renesas, hechtb,
javier.carrasco, jeff, krzk+dt, krzysztof.kozlowski, linux-input,
linux-kernel, linux-renesas-soc, magnus.damm, phucduc.bui, robh,
wsa+renesas
Hi Krzysztof,
> Do not attach (thread) your patchsets to some other threads (unrelated
> or older versions). This buries them deep in the mailbox and might
> interfere with applying entire sets. See also:
> https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830
>
Thank you for the guidance.
I would like to apologize for the confusion. While I was reviewing v2
myself, I realized there were technical issues and immediately worked on
v3 to fix them. Ironically, the fixes I made in v3 were exactly what you
suggested in your feedback for v2.
However, because I was so focused on the code, I sent out v3 before
checking my inbox and seeing your comments. This led me to unintentionally
repeat the same threading mistake you had just warned me about.
I have now carefully read the documentation you provided. I will ensure
that v4 is sent as a fresh, un-threaded series.
Thank you for your patience with a newcomer.
Best regards,
Phuc
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support
2026-03-06 10:44 ` Krzysztof Kozlowski
@ 2026-03-07 2:50 ` phucduc.bui
0 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-07 2:50 UTC (permalink / raw)
To: krzk
Cc: conor+dt, devicetree, dmitry.torokhov, geert+renesas, hechtb,
javier.carrasco, jeff, krzk+dt, linux-input, linux-kernel,
linux-renesas-soc, magnus.damm, phucduc.bui, robh, wsa+renesas
Hi Krzysztof,
> > + dev_info(dev, "st1232: suspend called\n");
> > + dev_info(dev, "st1232: irq=%d wakeup=%d\n", client->irq,
> device_may_wakeup(dev));
>
> No, there is no need to add success messages.
>
> >
> > - if (!device_may_wakeup(&client->dev))
> > + if (device_may_wakeup(dev)) {
> > + ret = enable_irq_wake(client->irq);
> > + dev_info(dev, "st1232: Supend use wakeup\n");
> > + dev_info(dev, "enable_irq_wake ret=%d\n", ret);
>
> Drop both
>
>
> > + } else {
> > + dev_info(dev, "st1232: Suspend Don't use wakeup\n");
>
> Drop
My apologies. You are absolutely right. I realized these debug messages
were unnecessary and already removed them in the v3 I sent (though I
unfortunately messed up the threading for that version).
I will ensure they stay removed in v4, which will be sent as a fresh
thread.
Best regards,
Phuc
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 0/3] Input: st1232 - add system wakeup support
2026-03-06 11:49 ` [PATCH v3 0/3] Input: st1232 - " Wolfram Sang
@ 2026-03-07 2:53 ` phucduc.bui
0 siblings, 0 replies; 19+ messages in thread
From: phucduc.bui @ 2026-03-07 2:53 UTC (permalink / raw)
To: wsa+renesas
Cc: conor+dt, devicetree, dmitry.torokhov, geert+renesas, hechtb,
javier.carrasco, jeff, krzk+dt, linux-input, linux-kernel,
linux-renesas-soc, magnus.damm, phucduc.bui, robh
Hi Wolfram,
> Krzysztof already adviced you to not attach new series to old threads.
> Please follow this suggestion:
>
> Do not attach (thread) your patchsets to some other threads (unrelated
> or older versions). This buries them deep in the mailbox and might
> interfere with applying entire sets. See also:
>
> https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830
>
You are right, and I apologize for the duplication of the mistake.
I missed Krzysztof's earlier reply while I was preparing v3, which led to
this incorrect threading again. I have already replied to Krzysztof's
thread to acknowledge the error.
I will follow the proper process by starting a fresh, un-threaded series
for v4.
Thank you for the reminder.
Best regards,
Phuc
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-03-07 2:53 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 11:35 [PATCH 0/2] st1232: Add wakeup-source support phucduc.bui
2026-03-05 11:35 ` [PATCH 1/2] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-06 8:18 ` Krzysztof Kozlowski
2026-03-06 10:24 ` phucduc.bui
2026-03-05 11:35 ` [PATCH 2/2] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
2026-03-06 10:40 ` [PATCH v2 0/3] Input: st1232 - add system wakeup support phucduc.bui
2026-03-06 10:40 ` [PATCH v2 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-06 10:42 ` Krzysztof Kozlowski
2026-03-07 2:46 ` phucduc.bui
2026-03-06 10:40 ` [PATCH v2 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
2026-03-06 10:40 ` [PATCH v2 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
2026-03-06 10:44 ` Krzysztof Kozlowski
2026-03-07 2:50 ` phucduc.bui
2026-03-06 11:19 ` [PATCH v3 0/3] Input: st1232 - " phucduc.bui
2026-03-06 11:19 ` [PATCH v3 1/3] dt-bindings: input: touchscreen: sitronix,st1232: Add wakeup-source phucduc.bui
2026-03-06 11:19 ` [PATCH v3 2/3] arm: dts: renesas: r8a7740-armadillo800eva: Add wakeup-source to st1232 phucduc.bui
2026-03-06 11:19 ` [PATCH v3 3/3] input: touchscreen: st1232: add system wakeup support phucduc.bui
2026-03-06 11:49 ` [PATCH v3 0/3] Input: st1232 - " Wolfram Sang
2026-03-07 2:53 ` phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox