From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Ezequiel García" <ezequiel@vanguardiasur.com.ar>
Cc: Mark Rutland <mark.rutland@arm.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Daniel Mack <daniel@zonque.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] input: rotary encoder: implement quarter period mode
Date: Sun, 18 May 2014 20:45:23 -0700 [thread overview]
Message-ID: <20140519034523.GA28435@core.coreip.homeip.net> (raw)
In-Reply-To: <20140519032659.GA1062@arch.cereza>
On Mon, May 19, 2014 at 12:26:59AM -0300, Ezequiel García wrote:
> On 08 May 02:01 PM, Ezequiel García wrote:
> > On 07 May 11:59 AM, Dmitry Torokhov wrote:
> > > On Wed, May 07, 2014 at 03:45:43PM +0100, Mark Rutland wrote:
> > > > On Wed, Dec 18, 2013 at 02:43:18PM +0000, Sascha Hauer wrote:
> > > > > Some rotary encoders have a stable state in all output state
> > > > > combinations. Add support for this type of encoder.
> > > > >
> > > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > Cc: Daniel Mack <daniel@zonque.org>
> > > > > Cc: linux-input@vger.kernel.org
> > > > > Cc: devicetree@vger.kernel.org
> > > > > ---
> > > > > .../devicetree/bindings/input/rotary-encoder.txt | 1 +
> > > > > Documentation/input/rotary-encoder.txt | 9 +++++--
> > > > > drivers/input/misc/rotary_encoder.c | 30 ++++++++++++++++++++--
> > > > > include/linux/rotary_encoder.h | 1 +
> > > > > 4 files changed, 37 insertions(+), 4 deletions(-)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
> > > > > index 3315495..cbdb29b 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,quarter-period: Makes the driver work on quarter-period mode.
> > > >
> > > > The new property looks as sane to me as the half-period property, so for
> > > > the binding addition:
> > >
> > > Actually, maybe we should deprecate rotary-encoder,half-period and
> > > instead add rotary-encoder,type property?
> > >
> >
> > Mark: what do you say?
> >
> > I can fix a few patches if everyone agrees...
>
> After some thought, it seemed to me we can define a more specific property
> to describe this, instead of a generic "type".
>
> The difference among these three "modes" is the number of turns needed to make
> a step.
>
> In the current driver, the default is 4 turns per step, where for the half-period
> mode it's 2 turns per step. Now, we need to support 1 turn per step and hence
> Sascha proposes a new quarter-period mode.
>
> Given we only need to describe the number of turns per step, I'd say it's
> more accurate and less confusing to deprecate the bool half-period property
> and instead introduce a "rotary-encoder,turns-per-step" integer property.
>
> How does this sound?
We'd have to "filter out" invalid step settings, but that sounds fine by
me.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-05-19 3:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 14:43 [PATCH] input: rotary encoder: implement quarter period mode Sascha Hauer
2014-05-07 14:45 ` Mark Rutland
[not found] ` <20140507144543.GE27177-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-05-07 14:51 ` Ezequiel García
2014-05-07 18:59 ` Dmitry Torokhov
2014-05-08 17:01 ` Ezequiel García
2014-05-19 3:26 ` Ezequiel García
2014-05-19 3:45 ` Dmitry Torokhov [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=20140519034523.GA28435@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=linux-input@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=s.hauer@pengutronix.de \
/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).