From: Maxime Ripard <maxime.ripard@bootlin.com>
To: "Mylène Josserand" <mylene.josserand@bootlin.com>
Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org,
mark.rutland@arm.com, linux-input@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com
Subject: Re: [PATCH v1] Input: rotary-encoder - Add gpio as push button
Date: Fri, 14 Jun 2019 16:51:58 +0200 [thread overview]
Message-ID: <20190614145158.ic5n4jauzigvcpru@flea> (raw)
In-Reply-To: <20190614133651.28396-1-mylene.josserand@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]
Hi Mylene,
On Fri, Jun 14, 2019 at 03:36:51PM +0200, Mylène Josserand wrote:
> Add the support of a gpio that can be defined as a push button.
> Thanks to that, it is possible to emit a keycode in case of a
> "push" event, if the rotary supports that.
>
> The keycode to emit is defined using "linux,code" property
> (such as in gpio-keys).
>
> Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
> ---
> .../devicetree/bindings/input/rotary-encoder.txt | 5 +++
> drivers/input/misc/rotary_encoder.c | 50 ++++++++++++++++++++++
> 2 files changed, 55 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> index a644408b33b8..1cfce5d0b5c4 100644
> --- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
> +++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> @@ -22,6 +22,9 @@ Optional properties:
> - wakeup-source: Boolean, rotary encoder can wake up the system.
> - rotary-encoder,encoding: String, the method used to encode steps.
> Supported are "gray" (the default and more common) and "binary".
> +- push-gpio: a gpio to be used as a detection of a push from the rotary.
According to Documentation/devicetree/bindings/gpio/gpio.txt, GPIO
properties with a -gpio suffix are now deprecated in favor of the
-gpios suffix.
> +- linux,code: keycode to emit with the push-gpio of this rotary encoder.
> + Required property in case "push-gpio"'s one is used.
I guess we should make it clear in the property name that it's the
keycode emitted at push. Otherwise, it will be ambiguous between the
rotary itself, or the button.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2019-06-14 14:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 13:36 [PATCH v1] Input: rotary-encoder - Add gpio as push button Mylène Josserand
2019-06-14 14:51 ` Maxime Ripard [this message]
2019-06-23 7:05 ` Dmitry Torokhov
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=20190614145158.ic5n4jauzigvcpru@flea \
--to=maxime.ripard@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mylene.josserand@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.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).