Thread (14 messages) 14 messages, 4 authors, 2023-03-29
STALE1169d REVIEWED: 1 (0M)
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 4/6] Input: cyttsp5: properly initialize the device as a pm wakeup device

From: Maximilian Weigand <hidden>
Date: 2023-03-23 13:58:03
Also in: linux-devicetree, lkml
Subsystem: cyttsp touchscreen driver, input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Linus Walleij, Dmitry Torokhov, Linus Torvalds

When used as a wakeup source the driver should be properly registered
with the pm system using device_init_wakeup.

Signed-off-by: Maximilian Weigand <redacted>
Reviewed-by: Alistair Francis <redacted>
---
 drivers/input/touchscreen/cyttsp5.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index 8b0c6975c6ec..01dd10a596ab 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -830,6 +830,9 @@ static int cyttsp5_probe(struct device *dev, struct regmap *regmap, int irq,
 		return error;
 	}
 
+	if (device_property_read_bool(dev, "wakeup-source"))
+		device_init_wakeup(dev, true);
+
 	error = cyttsp5_startup(ts);
 	if (error) {
 		dev_err(ts->dev, "Fail initial startup r=%d\n", error);
-- 
2.39.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help