All of lore.kernel.org
 help / color / mirror / Atom feed
From: nazgul33 <nazgul33@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Daniel Mack <daniel@caiaq.de>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Input: rotaty-encoder - Add DT binding document
Date: Sun, 6 Jan 2019 12:41:36 +0900	[thread overview]
Message-ID: <CAEo1RiwW4_j8t4G9amF7NsAmri5WYaYckz5VoZsKM1=saiLEfA@mail.gmail.com> (raw)
In-Reply-To: <CAKdAkRR80M4R4bWPu4smPD5=KPWanL+EFPvDUYLNrHaFQfApPw@mail.gmail.com>

Yes, it's needed.
Even with the same encoder, adjusting steps affects rate of event generation.
(the steps defines 1 cycle of encoder rotation, and 1 cycle = 1 key event.)

On Sun, Jan 6, 2019 at 8:11 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Sat, Jan 5, 2019 at 2:27 PM Donghoon Han <nazgul33@gmail.com> wrote:
> >
> > Add DT binding document for rotary-encoder, keycode options.
> >
> > Signed-off-by: Donghoon Han <nazgul33@gmail.com>
> > ---
> >  .../devicetree/bindings/input/rotary-encoder.txt     | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> > index f99fe5cdeaec..113640079de3 100644
> > --- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
> > +++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> > @@ -12,6 +12,10 @@ Optional properties:
> >  - rotary-encoder,relative-axis: register a relative axis rather than an
> >    absolute one. Relative axis will only generate +1/-1 events on the input
> >    device, hence no steps need to be passed.
> > +- rotary-encoder,relative-keys : generate pair of key events. This setting
> > +  behaves just like relative-axis, generating key events. keycode[2]
> > +  corresponds -1/1 events.
> > +- rotary-encoder,relative-keycodes : keycodes for relative-keys
> >  - rotary-encoder,rollover: Automatic rollover when the rotary value becomes
> >    greater than the specified steps or smaller than 0. For absolute axis only.
> >  - rotary-encoder,steps-per-period: Number of steps (stable states) per period.
> > @@ -48,3 +52,11 @@ Example:
> >                         rotary-encoder,encoding = "binary";
> >                         rotary-encoder,rollover;
> >                 };
> > +
> > +               rotary@2 {
> > +                       compatible = "rotary-encoder";
> > +                       gpios = <&gpio 21 0>, <&gpio 22 0>;
> > +                       rotary-encoder,relative-keys;
> > +                       rotary-encoder,relative-keycode = <103>, <108>;
> > +                       rotary-encoder,steps-per-period = <2>;
>
> Do you need steps for keys? They weren't required for the relative axis mode.
>
> Thanks.
>
> --
> Dmitry



-- 
한동훈 드림.

      reply	other threads:[~2019-01-06  3:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 20:26 [PATCH 0/2] input: rotary-encoder: Support key events Donghoon Han
2019-01-05 20:26 ` [PATCH 1/2] Input: rotary_encoder - " Donghoon Han
2019-01-05 23:12   ` Dmitry Torokhov
2019-01-06  3:36     ` nazgul33
2019-01-07  0:38       ` Dmitry Torokhov
2019-01-05 20:26 ` [PATCH 2/2] Input: rotaty-encoder - Add DT binding document Donghoon Han
2019-01-05 23:11   ` Dmitry Torokhov
2019-01-06  3:41     ` nazgul33 [this message]

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='CAEo1RiwW4_j8t4G9amF7NsAmri5WYaYckz5VoZsKM1=saiLEfA@mail.gmail.com' \
    --to=nazgul33@gmail.com \
    --cc=daniel@caiaq.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.