* [PATCH 0/2] This patches set cros_ec_keyb as a wakeup source, so the chromeos's powerd @ 2017-03-30 9:50 Jeffy Chen 2017-03-30 9:50 ` [PATCH 1/2] input: cros_ec_keyb: Report wakeup events Jeffy Chen 0 siblings, 1 reply; 5+ messages in thread From: Jeffy Chen @ 2017-03-30 9:50 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w, dbasehore-hpIqsD4AKlfQT0dZR+AlfA, dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Gwendal Grignou, Vic Yang, Enric Balletbo Serra, devicetree-u79uwXL29TY76Z2rM5mHXA, Lee Jones, Rob Herring, Mark Rutland, linux-input-u79uwXL29TY76Z2rM5mHXA, Russell King can control the keyboard's wakeup ability along with other ec event sources. Jeffy Chen (2): input: cros_ec_keyb: Report wakeup events ARM: dts: cros-ec-keyboard: Enable as wakeup source arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 + drivers/input/keyboard/cros_ec_keyb.c | 9 +++++++++ 2 files changed, 10 insertions(+) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] input: cros_ec_keyb: Report wakeup events 2017-03-30 9:50 [PATCH 0/2] This patches set cros_ec_keyb as a wakeup source, so the chromeos's powerd Jeffy Chen @ 2017-03-30 9:50 ` Jeffy Chen 2017-04-01 17:12 ` Dmitry Torokhov 0 siblings, 1 reply; 5+ messages in thread From: Jeffy Chen @ 2017-03-30 9:50 UTC (permalink / raw) To: linux-kernel Cc: briannorris, dmitry.torokhov, dbasehore, dianders, Jeffy Chen, Gwendal Grignou, Vic Yang, linux-input, Enric Balletbo Serra, Lee Jones Report wakeup events when process events. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> --- 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] input: cros_ec_keyb: Report wakeup events 2017-03-30 9:50 ` [PATCH 1/2] input: cros_ec_keyb: Report wakeup events Jeffy Chen @ 2017-04-01 17:12 ` Dmitry Torokhov 2017-04-01 17:14 ` Dmitry Torokhov 0 siblings, 1 reply; 5+ messages in thread From: Dmitry Torokhov @ 2017-04-01 17:12 UTC (permalink / raw) To: Jeffy Chen Cc: linux-kernel, briannorris, dbasehore, dianders, Gwendal Grignou, Vic Yang, linux-input, Enric Balletbo Serra, Lee Jones Hi Jeffy, On Thu, Mar 30, 2017 at 05:50:49PM +0800, Jeffy Chen wrote: > Report wakeup events when process events. > > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> > --- > > 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); In the other patch you are adding "wakeup-source" to the DT binding, but here you mark all EC deices as wakeup sources. You need to use device_property_read_bool(dev, "wakeup-source") and use the result in call to device_init_wakeup(). > + if (err) { > + dev_err(dev, "cannot init wakeup: %d\n", err); > + return err; > + } > + > return 0; > } > Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] input: cros_ec_keyb: Report wakeup events 2017-04-01 17:12 ` Dmitry Torokhov @ 2017-04-01 17:14 ` Dmitry Torokhov 2017-04-02 0:10 ` jeffy 0 siblings, 1 reply; 5+ messages in thread From: Dmitry Torokhov @ 2017-04-01 17:14 UTC (permalink / raw) To: Jeffy Chen Cc: linux-kernel, briannorris, dbasehore, dianders, Gwendal Grignou, Vic Yang, linux-input, Enric Balletbo Serra, Lee Jones On Sat, Apr 01, 2017 at 10:12:37AM -0700, Dmitry Torokhov wrote: > Hi Jeffy, > > On Thu, Mar 30, 2017 at 05:50:49PM +0800, Jeffy Chen wrote: > > Report wakeup events when process events. > > > > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> > > --- > > > > 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); > > In the other patch you are adding "wakeup-source" to the DT binding, but > here you mark all EC deices as wakeup sources. You need to use > device_property_read_bool(dev, "wakeup-source") and use the result in > call to device_init_wakeup(). And please also update device tree binding doc for the driver. > > > + if (err) { > > + dev_err(dev, "cannot init wakeup: %d\n", err); > > + return err; > > + } > > + > > return 0; > > } > > > > Thanks. > > -- > Dmitry -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] input: cros_ec_keyb: Report wakeup events 2017-04-01 17:14 ` Dmitry Torokhov @ 2017-04-02 0:10 ` jeffy 0 siblings, 0 replies; 5+ messages in thread From: jeffy @ 2017-04-02 0:10 UTC (permalink / raw) To: Dmitry Torokhov Cc: linux-kernel, briannorris, dbasehore, dianders, Gwendal Grignou, Vic Yang, linux-input, Enric Balletbo Serra, Lee Jones Hi Dmitry, On 04/02/2017 01:14 AM, Dmitry Torokhov wrote: > On Sat, Apr 01, 2017 at 10:12:37AM -0700, Dmitry Torokhov wrote: >> Hi Jeffy, >> >> On Thu, Mar 30, 2017 at 05:50:49PM +0800, Jeffy Chen wrote: >>> Report wakeup events when process events. >>> >>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> >>> --- >>> >>> 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); >> >> In the other patch you are adding "wakeup-source" to the DT binding, but >> here you mark all EC deices as wakeup sources. You need to use >> device_property_read_bool(dev, "wakeup-source") and use the result in >> call to device_init_wakeup(). > > And please also update device tree binding doc for the driver. > oops, sorry, i thought that dts property is needed to enable a wakeup source...but obviously it's not, only gpio-keys requires that. so the dts patch is not needed, will remove in next version, thanx. >> >>> + if (err) { >>> + dev_err(dev, "cannot init wakeup: %d\n", err); >>> + return err; >>> + } >>> + >>> return 0; >>> } >>> >> >> Thanks. >> >> -- >> Dmitry > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-02 0:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-30 9:50 [PATCH 0/2] This patches set cros_ec_keyb as a wakeup source, so the chromeos's powerd Jeffy Chen 2017-03-30 9:50 ` [PATCH 1/2] input: cros_ec_keyb: Report wakeup events Jeffy Chen 2017-04-01 17:12 ` Dmitry Torokhov 2017-04-01 17:14 ` Dmitry Torokhov 2017-04-02 0:10 ` jeffy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).