Skip to content

Commit d778123

Browse files
SiFiveHollanddtor
authored andcommitted
Input: da9063 - add wakeup support
Mark the IRQ as a wake IRQ so it will be enabled during system suspend. Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 904ef2c commit d778123

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/input/misc/da9063_onkey.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/input.h>
1111
#include <linux/interrupt.h>
1212
#include <linux/platform_device.h>
13+
#include <linux/pm_wakeirq.h>
1314
#include <linux/workqueue.h>
1415
#include <linux/regmap.h>
1516
#include <linux/of.h>
@@ -251,6 +252,14 @@ static int da9063_onkey_probe(struct platform_device *pdev)
251252
return error;
252253
}
253254

255+
error = dev_pm_set_wake_irq(&pdev->dev, irq);
256+
if (error)
257+
dev_warn(&pdev->dev,
258+
"Failed to set IRQ %d as a wake IRQ: %d\n",
259+
irq, error);
260+
else
261+
device_init_wakeup(&pdev->dev, true);
262+
254263
error = input_register_device(onkey->input);
255264
if (error) {
256265
dev_err(&pdev->dev,

0 commit comments

Comments
 (0)