From: Johan Hovold <johan@kernel.org>
To: Sylvain Rochet <sylvain.rochet@finsecur.com>
Cc: linux-input@vger.kernel.org, Daniel Mack <daniel@caiaq.de>,
Johan Hovold <jhovold@gmail.com>
Subject: Re: [PATCH] rotary encoder: Add wake up support
Date: Thu, 29 Jan 2015 11:49:53 +0100 [thread overview]
Message-ID: <20150129104953.GC5312@localhost> (raw)
In-Reply-To: <1421164262-28261-1-git-send-email-sylvain.rochet@finsecur.com>
On Tue, Jan 13, 2015 at 04:51:02PM +0100, Sylvain Rochet wrote:
> This patch add wake up support for rotary encoders.
> New DT property: rotary-encoder,wakeup
>
> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> ---
> .../devicetree/bindings/input/rotary-encoder.txt | 1 +
> Documentation/input/rotary-encoder.txt | 1 +
> drivers/input/misc/rotary_encoder.c | 36 ++++++++++++++++++++++
> include/linux/rotary_encoder.h | 1 +
> 4 files changed, 39 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> index 3315495..468d545 100644
> --- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
> +++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> @@ -15,6 +15,7 @@ Optional properties:
> - rotary-encoder,rollover: Automatic rollove when the rotary value becomes
> greater than the specified steps or smaller than 0. For absolute axis only.
> - rotary-encoder,half-period: Makes the driver work on half-period mode.
> +- rotary-encoder,wakeup: Boolean, rotary encoder can wake-up the system.
As Dmitry already mentioned this should probably just be
"wakeup-source".
[...]
> +static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops, rotary_encoder_suspend, rotary_encoder_resume);
Please break this line to stay within 80 cols.
> +
> static struct platform_driver rotary_encoder_driver = {
> .probe = rotary_encoder_probe,
> .remove = rotary_encoder_remove,
> .driver = {
> .name = DRV_NAME,
> + .pm = &rotary_encoder_pm_ops,
> .of_match_table = of_match_ptr(rotary_encoder_of_match),
> }
> };
> diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h
> index 3f594dc..72b3fc9 100644
> --- a/include/linux/rotary_encoder.h
> +++ b/include/linux/rotary_encoder.h
> @@ -11,6 +11,7 @@ struct rotary_encoder_platform_data {
> bool relative_axis;
> bool rollover;
> bool half_period;
> + int wakeup; /* configure the rotary-encoder as a wake-up source */
This should be bool.
I also suggest you rename the variable wakeup_source and drop the
verbose comment.
Looks good otherwise.
Thanks,
Johan
next prev parent reply other threads:[~2015-01-29 10:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 15:51 [PATCH] rotary encoder: Add wake up support Sylvain Rochet
[not found] ` <1421164262-28261-1-git-send-email-sylvain.rochet-ETtyaVkrhkNWk0Htik3J/w@public.gmane.org>
2015-01-15 17:33 ` Dmitry Torokhov
2015-01-29 10:49 ` Johan Hovold [this message]
2015-01-29 11:14 ` Sylvain Rochet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150129104953.GC5312@localhost \
--to=johan@kernel.org \
--cc=daniel@caiaq.de \
--cc=jhovold@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sylvain.rochet@finsecur.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).