[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230501113010.891786-5-mweigand@mweigand.net>
Date: Mon, 1 May 2023 13:30:08 +0200
From: Maximilian Weigand <mweigand@...igand.net>
To: Linus Walleij <linus.walleij@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Cc: Maximilian Weigand <mweigand@...igand.net>,
Alistair Francis <alistair@...stair23.me>
Subject: [PATCH v2 4/6] Input: cyttsp5 - properly initialize the device as a pm wakeup device
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 <mweigand@...igand.net>
Reviewed-by: Alistair Francis <alistair@...stair23.me>
---
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 55abf568bdf6..f701125357f0 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
Powered by blists - more mailing lists