Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614618
| From | Jeffy Chen <jeffy.chen@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] input: cros_ec_keyb: Report wakeup events |
| Date | 2017-04-02 02:10 +0200 |
| Message-ID | <trBfH-1l4-1@gated-at.bofh.it> (permalink) |
| References | <trBfH-1l4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Report wakeup events when process events.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v2:
Remove unneeded dts changes.
drivers/input/keyboard/cros_ec_keyb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 6a250d6..a93d55f 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -286,6 +286,9 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
return NOTIFY_DONE;
}
+ if (device_may_wakeup(ckdev->dev))
+ pm_wakeup_event(ckdev->dev, 0);
+
return NOTIFY_OK;
}
@@ -632,6 +635,12 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
return err;
}
+ err = device_init_wakeup(dev, 1);
+ if (err) {
+ dev_err(dev, "cannot init wakeup: %d\n", err);
+ return err;
+ }
+
return 0;
}
--
2.1.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2] input: cros_ec_keyb: Report wakeup events Jeffy Chen <jeffy.chen@rock-chips.com> - 2017-04-02 02:10 +0200
Re: [PATCH v2] input: cros_ec_keyb: Report wakeup events Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-03 20:50 +0200
Re: [PATCH v2] input: cros_ec_keyb: Report wakeup events Brian Norris <briannorris@chromium.org> - 2017-04-03 23:00 +0200
Re: [PATCH v2] input: cros_ec_keyb: Report wakeup events Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-04 00:50 +0200
Re: [PATCH v2] input: cros_ec_keyb: Report wakeup events jeffy <jeffy.chen@rock-chips.com> - 2017-04-05 03:30 +0200
csiph-web