* [PATCH 0/3] Touchscreen wakeup for the OnePlus 6 and 6T
@ 2026-11-22 5:13 EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 1/3] dt-bindings: input: syna,rmi4: Document wakeup-source EMCP333 via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22 5:13 UTC (permalink / raw)
To: Dmitry Torokhov, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jason A. Donenfeld, Matthias Schiffer, Vincent Huang, Abel Vesa,
Casey Connolly, linux-input, linux-arm-msm, devicetree,
linux-kernel, EMCP333
The Synaptics touchscreen on the OnePlus 6 and 6T is meant to wake the
SoC from s2idle. The I2C core and the rmi4 driver already handle
"wakeup-source", but rmi_i2c cuts the controller's supplies in system
suspend right after it arms the wake interrupt. Unpowered, the
controller cannot report a touch, and on these phones cutting the
supplies also raises the attention interrupt, which ends every s2idle
within a few seconds.
Patch 1 lets the rmi4 binding accept "wakeup-source". Patch 2 keeps an
rmi4 I2C device that may wake the system powered in system suspend, as
edt-ft5x06 does. Patch 3 sets the property in
sdm845-oneplus-common.dtsi.
Patches 1 and 2 are for the input tree and patch 3 for the Qualcomm
tree. Patch 3 needs patch 1 for dtbs_check, and should not land before
patch 2: without it, every s2idle on these phones ends at once.
Tested on a OnePlus 6T on v7.4-rc3 with all three patches, rmi_core and
rmi_i2c built as modules from patch 2's commit. With nobody touching the
phone, "rtcwake -m freeze -s 30" slept the full 30 seconds with no
attention interrupt (2 of 2); without patch 2 it came back after 3 to 4
seconds, one attention interrupt each time (3 of 3). A double-tap on the
dark phone woke it from "rtcwake -m freeze -s 120" after 3 and 7
seconds, one attention interrupt burst each. With wakeup disabled the
supplies are cut as before and it slept the full 30 seconds (2 of 2).
On v7.4-rc2, dt_binding_check is clean, dtbs_check reports nothing new
for fajita or enchilada, and rmi_i2c.c builds cleanly with W=1.
---
EMCP333 (3):
dt-bindings: input: syna,rmi4: Document wakeup-source
Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
arm64: dts: qcom: sdm845-oneplus: Mark the touchscreen as a wakeup source
.../devicetree/bindings/input/syna,rmi4.yaml | 2 ++
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 +
drivers/input/rmi4/rmi_i2c.c | 22 +++++++++++++++-------
3 files changed, 18 insertions(+), 7 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261122-b4-rmi4-wakeup-5948487a39ed
Best regards,
--
EMCP333 <emcp@enser.io>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] dt-bindings: input: syna,rmi4: Document wakeup-source
2026-11-22 5:13 [PATCH 0/3] Touchscreen wakeup for the OnePlus 6 and 6T EMCP333 via B4 Relay
@ 2026-11-22 5:13 ` EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845-oneplus: Mark the touchscreen as a wakeup source EMCP333 via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22 5:13 UTC (permalink / raw)
To: Dmitry Torokhov, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jason A. Donenfeld, Matthias Schiffer, Vincent Huang, Abel Vesa,
Casey Connolly, linux-input, linux-arm-msm, devicetree,
linux-kernel, EMCP333
From: EMCP333 <emcp@enser.io>
The I2C core already turns a "wakeup-source" property into a
wakeup-capable device: of_i2c_get_board_info() sets I2C_CLIENT_WAKE and
i2c_device_probe() then calls device_init_wakeup() and
dev_pm_set_wake_irq(). rmi_driver additionally arms the attention IRQ
with enable_irq_wake() in rmi_disable_irq() when device_may_wakeup() is
true.
The binding does not list the property, so a board that sets it fails
dtbs_check:
sdm845-oneplus-fajita.dtb: synaptics-rmi4-i2c@20 (syna,rmi4-s3706b):
Unevaluated properties are not allowed ('wakeup-source' was unexpected)
Allow it.
The code and this changelog were prepared with the help of an AI coding
assistant. The submitter has reviewed both and takes responsibility for
them.
Signed-off-by: EMCP333 <emcp@enser.io>
---
Documentation/devicetree/bindings/input/syna,rmi4.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/syna,rmi4.yaml b/Documentation/devicetree/bindings/input/syna,rmi4.yaml
index fb4804ac35..34bcc25135 100644
--- a/Documentation/devicetree/bindings/input/syna,rmi4.yaml
+++ b/Documentation/devicetree/bindings/input/syna,rmi4.yaml
@@ -57,6 +57,8 @@ properties:
vdd-supply: true
vio-supply: true
+ wakeup-source: true
+
rmi4-f01@1:
type: object
additionalProperties: false
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
2026-11-22 5:13 [PATCH 0/3] Touchscreen wakeup for the OnePlus 6 and 6T EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 1/3] dt-bindings: input: syna,rmi4: Document wakeup-source EMCP333 via B4 Relay
@ 2026-11-22 5:13 ` EMCP333 via B4 Relay
2026-11-22 5:23 ` sashiko-bot
2026-11-22 5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845-oneplus: Mark the touchscreen as a wakeup source EMCP333 via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22 5:13 UTC (permalink / raw)
To: Dmitry Torokhov, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jason A. Donenfeld, Matthias Schiffer, Vincent Huang, Abel Vesa,
Casey Connolly, linux-input, linux-arm-msm, devicetree,
linux-kernel, EMCP333
From: EMCP333 <emcp@enser.io>
rmi_i2c_suspend() arms the attention interrupt for wakeup through
rmi_driver_suspend(..., true) and then disables the vdd and vio supplies.
Unpowered, the controller cannot report a touch, so the wakeup it has just
armed can never come from the user. Where the attention line is pulled up
from the switched I/O supply, cutting that supply also pulls the line
low, and that falling edge ends the suspend by itself.
On a OnePlus 6T (S3706B, attention on a falling-edge GPIO, vio from a
GPIO-controlled fixed regulator) with the touchscreen marked as a wakeup
source, every s2idle ended within 3 to 4 seconds with nobody touching the
phone, with one attention interrupt per suspend.
Keep the supplies on in system suspend when the device may wake the
system, as edt-ft5x06 does, and skip the matching re-enable and startup
delay on resume. A device that may not wake is powered down as before.
Tested on a OnePlus 6T on v7.4-rc3 with 'wakeup-source' on the
touchscreen node. With wakeup enabled and nothing touching the phone,
"rtcwake -m freeze -s 30" slept the full 30 seconds with no attention
interrupt (2 of 2), and a double-tap woke it (2 of 2, 120 second RTC
fallback). With wakeup disabled the supplies are cut as before and it
slept until the RTC (2 of 2).
The code and this changelog were prepared with the help of an AI coding
assistant. The submitter has reviewed both and takes responsibility for
them.
Signed-off-by: EMCP333 <emcp@enser.io>
---
drivers/input/rmi4/rmi_i2c.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c
index b0b36ddb27..315d203056 100644
--- a/drivers/input/rmi4/rmi_i2c.c
+++ b/drivers/input/rmi4/rmi_i2c.c
@@ -296,8 +296,14 @@ static int rmi_i2c_suspend(struct device *dev)
if (ret)
dev_warn(dev, "Failed to resume device: %d\n", ret);
- regulator_bulk_disable(ARRAY_SIZE(rmi_i2c->supplies),
- rmi_i2c->supplies);
+ /*
+ * A device that may wake the system has to stay powered: cutting its
+ * supplies drops the attention line, which is a wake event of its own,
+ * and leaves the controller unable to report a touch.
+ */
+ if (!device_may_wakeup(dev))
+ regulator_bulk_disable(ARRAY_SIZE(rmi_i2c->supplies),
+ rmi_i2c->supplies);
return ret;
}
@@ -308,12 +314,14 @@ static int rmi_i2c_resume(struct device *dev)
struct rmi_i2c_xport *rmi_i2c = i2c_get_clientdata(client);
int ret;
- ret = regulator_bulk_enable(ARRAY_SIZE(rmi_i2c->supplies),
- rmi_i2c->supplies);
- if (ret)
- return ret;
+ if (!device_may_wakeup(dev)) {
+ ret = regulator_bulk_enable(ARRAY_SIZE(rmi_i2c->supplies),
+ rmi_i2c->supplies);
+ if (ret)
+ return ret;
- msleep(rmi_i2c->startup_delay);
+ msleep(rmi_i2c->startup_delay);
+ }
ret = rmi_driver_resume(rmi_i2c->xport.rmi_dev, true);
if (ret)
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sdm845-oneplus: Mark the touchscreen as a wakeup source
2026-11-22 5:13 [PATCH 0/3] Touchscreen wakeup for the OnePlus 6 and 6T EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 1/3] dt-bindings: input: syna,rmi4: Document wakeup-source EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered EMCP333 via B4 Relay
@ 2026-11-22 5:13 ` EMCP333 via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22 5:13 UTC (permalink / raw)
To: Dmitry Torokhov, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jason A. Donenfeld, Matthias Schiffer, Vincent Huang, Abel Vesa,
Casey Connolly, linux-input, linux-arm-msm, devicetree,
linux-kernel, EMCP333
From: EMCP333 <emcp@enser.io>
Without "wakeup-source" the Synaptics touchscreen on the OnePlus 6 and 6T
has no power/wakeup attribute and its attention IRQ is not armed across
system suspend, so a touch (for example double-tap-to-wake) cannot wake
the SoC from s2idle.
Mark it as a wakeup source. The I2C core registers it as a wakeup-capable
device and arms its IRQ for wake.
This needs "Input: synaptics-rmi4 - keep an I2C device that may wake the
system powered". Without it rmi_i2c cuts the touchscreen supplies in
suspend, the attention line falls and every s2idle ends within seconds.
Tested on a OnePlus 6T on v7.4-rc3 with that change:
/sys/bus/i2c/devices/12-0020/power/wakeup reads "enabled". With nothing
touching the phone, "rtcwake -m freeze -s 30" slept the full 30 seconds,
and a double-tap woke it with a 60 second RTC fallback.
The code and this changelog were prepared with the help of an AI coding
assistant. The submitter has reviewed both and takes responsibility for
them.
Signed-off-by: EMCP333 <emcp@enser.io>
---
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 1df09da3c4..187bd6f45e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -533,6 +533,7 @@ synaptics-rmi4-i2c@20 {
syna,reset-delay-ms = <200>;
syna,startup-delay-ms = <200>;
+ wakeup-source;
rmi4-f01@1 {
reg = <0x01>;
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
2026-11-22 5:13 ` [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered EMCP333 via B4 Relay
@ 2026-11-22 5:23 ` sashiko-bot
2026-11-22 6:42 ` Erik Peterson
0 siblings, 1 reply; 6+ messages in thread
From: sashiko-bot @ 2026-11-22 5:23 UTC (permalink / raw)
To: EMCP333; +Cc: linux-input, devicetree, robh, conor+dt, dmitry.torokhov
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] Input: synaptics-rmi4 - missing Fixes trailer for commit
946c8432aab0
--
commit 83b2656443640f5726e0dae2d6e9d52155752d68
Author: EMCP333 <emcp@enser.io>
> Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
>
> rmi_i2c_suspend() arms the attention interrupt for wakeup through
> rmi_driver_suspend(..., true) and then disables the vdd and vio supplies.
> Unpowered, the controller cannot report a touch, so the wakeup it has just
> armed can never come from the user. Where the attention line is pulled up
> from the switched I/O supply, cutting that supply also pulls the line
> low, and that falling edge ends the suspend by itself.
>
> On a OnePlus 6T (S3706B, attention on a falling-edge GPIO, vio from a
> GPIO-controlled fixed regulator) with the touchscreen marked as a wakeup
> source, every s2idle ended within 3 to 4 seconds with nobody touching the
> phone, with one attention interrupt per suspend.
>
> Keep the supplies on in system suspend when the device may wake the
> system, as edt-ft5x06 does, and skip the matching re-enable and startup
> delay on resume. A device that may not wake is powered down as before.
>
> Tested on a OnePlus 6T on v7.4-rc3 with 'wakeup-source' on the
> touchscreen node. With wakeup enabled and nothing touching the phone,
> "rtcwake -m freeze -s 30" slept the full 30 seconds with no attention
> interrupt (2 of 2), and a double-tap woke it (2 of 2, 120 second RTC
> fallback). With wakeup disabled the supplies are cut as before and it
> slept until the RTC (2 of 2).
>
> The code and this changelog were prepared with the help of an AI coding
> assistant. The submitter has reviewed both and takes responsibility for
> them.
>
> Signed-off-by: EMCP333 <emcp@enser.io>
[Severity: Low]
This fixes a bug introduced when regulator support was added to
rmi_i2c_suspend() and rmi_i2c_resume(). Should the commit message include:
Fixes: 946c8432aab0 ("Input: synaptics-rmi4 - support regulator supplies")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-b4-rmi4-wakeup-v1-0-1b662be4a9d6@enser.io?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
2026-11-22 5:23 ` sashiko-bot
@ 2026-11-22 6:42 ` Erik Peterson
0 siblings, 0 replies; 6+ messages in thread
From: Erik Peterson @ 2026-11-22 6:42 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-input, devicetree, robh, conor+dt, dmitry.torokhov
⏺ (Resending as plain text; the lists rejected my first copy.)
Thanks. 946c8432aab0 is where rmi_i2c_suspend() started disabling the
supplies after arming the wake IRQ, so the tag is right. I'll add it in
v2; Dmitry, if v1 is otherwise fine, could you add it when applying?
Fixes: 946c8432aab0 ("Input: synaptics-rmi4 - support regulator supplies")
On Sat, Nov 21, 2026 at 9:23 PM <sashiko-bot@kernel.org> wrote:
>
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] Input: synaptics-rmi4 - missing Fixes trailer for commit
> 946c8432aab0
> --
>
> commit 83b2656443640f5726e0dae2d6e9d52155752d68
> Author: EMCP333 <emcp@enser.io>
>
> > Input: synaptics-rmi4 - keep an I2C device that may wake the system powered
> >
> > rmi_i2c_suspend() arms the attention interrupt for wakeup through
> > rmi_driver_suspend(..., true) and then disables the vdd and vio supplies.
> > Unpowered, the controller cannot report a touch, so the wakeup it has just
> > armed can never come from the user. Where the attention line is pulled up
> > from the switched I/O supply, cutting that supply also pulls the line
> > low, and that falling edge ends the suspend by itself.
> >
> > On a OnePlus 6T (S3706B, attention on a falling-edge GPIO, vio from a
> > GPIO-controlled fixed regulator) with the touchscreen marked as a wakeup
> > source, every s2idle ended within 3 to 4 seconds with nobody touching the
> > phone, with one attention interrupt per suspend.
> >
> > Keep the supplies on in system suspend when the device may wake the
> > system, as edt-ft5x06 does, and skip the matching re-enable and startup
> > delay on resume. A device that may not wake is powered down as before.
> >
> > Tested on a OnePlus 6T on v7.4-rc3 with 'wakeup-source' on the
> > touchscreen node. With wakeup enabled and nothing touching the phone,
> > "rtcwake -m freeze -s 30" slept the full 30 seconds with no attention
> > interrupt (2 of 2), and a double-tap woke it (2 of 2, 120 second RTC
> > fallback). With wakeup disabled the supplies are cut as before and it
> > slept until the RTC (2 of 2).
> >
> > The code and this changelog were prepared with the help of an AI coding
> > assistant. The submitter has reviewed both and takes responsibility for
> > them.
> >
> > Signed-off-by: EMCP333 <emcp@enser.io>
>
> [Severity: Low]
> This fixes a bug introduced when regulator support was added to
> rmi_i2c_suspend() and rmi_i2c_resume(). Should the commit message include:
>
> Fixes: 946c8432aab0 ("Input: synaptics-rmi4 - support regulator supplies")
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261122-b4-rmi4-wakeup-v1-0-1b662be4a9d6@enser.io?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-22 6:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 5:13 [PATCH 0/3] Touchscreen wakeup for the OnePlus 6 and 6T EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 1/3] dt-bindings: input: syna,rmi4: Document wakeup-source EMCP333 via B4 Relay
2026-11-22 5:13 ` [PATCH 2/3] Input: synaptics-rmi4 - keep an I2C device that may wake the system powered EMCP333 via B4 Relay
2026-11-22 5:23 ` sashiko-bot
2026-11-22 6:42 ` Erik Peterson
2026-11-22 5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845-oneplus: Mark the touchscreen as a wakeup source EMCP333 via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox