* [PATCH] input: rotary encoder: implement quarter period mode
@ 2013-12-18 14:43 Sascha Hauer
2014-05-07 14:45 ` Mark Rutland
0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2013-12-18 14:43 UTC (permalink / raw)
To: linux-input; +Cc: Sascha Hauer, Dmitry Torokhov, Daniel Mack, devicetree
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.
See Documentation/input/rotary-encoder.txt for more information.
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 92e68bc..0bbff7e 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -9,8 +9,10 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees
and by triggering on falling and rising edges, the turn direction can
be determined.
-Some encoders have both outputs low in stable states, whereas others also have
-a stable state with both outputs high (half-period mode).
+
+Some encoders have both outputs low in stable states, others also have
+a stable state with both outputs high (half-period mode) and some have
+a stable state in all steps (quarter-period mode).
The phase diagram of these two outputs look like this:
@@ -32,6 +34,9 @@ The phase diagram of these two outputs look like this:
|<-->|
one step (half-period mode)
+ |<>|
+ one step (quarter-period mode)
+
For more information, please see
http://en.wikipedia.org/wiki/Rotary_encoder
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 5b1aff8..264501c 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -42,7 +42,7 @@ struct rotary_encoder {
bool armed;
unsigned char dir; /* 0 - clockwise, 1 - CCW */
- char last_stable;
+ int last_stable;
};
static int rotary_encoder_get_state(const struct rotary_encoder_platform_data *pdata)
@@ -117,6 +117,28 @@ static irqreturn_t rotary_encoder_irq(int irq, void *dev_id)
return IRQ_HANDLED;
}
+static irqreturn_t rotary_encoder_quarter_period_irq(int irq, void *dev_id)
+{
+ struct rotary_encoder *encoder = dev_id;
+ int state;
+ static const u8 states[4][4] = {
+ { -1, 1, 0, -1 },
+ { 0, -1, -1, 1 },
+ { 1, -1, -1, 0 },
+ { -1, 0, 1, -1 },
+ };
+
+ state = rotary_encoder_get_state(encoder->pdata);
+
+ encoder->dir = states[encoder->last_stable][state];
+ encoder->last_stable = state;
+
+ if (encoder->dir >= 0)
+ rotary_encoder_report_event(encoder);
+
+ return IRQ_HANDLED;
+}
+
static irqreturn_t rotary_encoder_half_period_irq(int irq, void *dev_id)
{
struct rotary_encoder *encoder = dev_id;
@@ -180,7 +202,8 @@ static struct rotary_encoder_platform_data *rotary_encoder_parse_dt(struct devic
"rotary-encoder,rollover", NULL);
pdata->half_period = !!of_get_property(np,
"rotary-encoder,half-period", NULL);
-
+ pdata->quarter_period = !!of_get_property(np,
+ "rotary-encoder,quarter-period", NULL);
return pdata;
}
#else
@@ -254,6 +277,9 @@ static int rotary_encoder_probe(struct platform_device *pdev)
if (pdata->half_period) {
handler = &rotary_encoder_half_period_irq;
encoder->last_stable = rotary_encoder_get_state(pdata);
+ } else if (pdata->quarter_period) {
+ handler = &rotary_encoder_quarter_period_irq;
+ encoder->last_stable = rotary_encoder_get_state(pdata);
} else {
handler = &rotary_encoder_irq;
}
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h
index 3f594dc..fd0a70f 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;
+ bool quarter_period;
};
#endif /* __ROTARY_ENCODER_H__ */
--
1.8.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
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 18:59 ` Dmitry Torokhov
0 siblings, 2 replies; 7+ messages in thread
From: Mark Rutland @ 2014-05-07 14:45 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-input@vger.kernel.org, Dmitry Torokhov, Daniel Mack,
devicetree@vger.kernel.org
Hi,
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:
Acked-by: Mark Rutland <mark.rutland@arm.com>
As a general nitpick it would be nicer if the binding didn't refer to
the driver and had a description of {half,quarter} period modes inline,
but that might be a bit tricky and shouldn't block this.
Cheers,
Mark.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
[not found] ` <20140507144543.GE27177-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
@ 2014-05-07 14:51 ` Ezequiel García
0 siblings, 0 replies; 7+ messages in thread
From: Ezequiel García @ 2014-05-07 14:51 UTC (permalink / raw)
To: Mark Rutland, Dmitry Torokhov
Cc: Sascha Hauer, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Daniel Mack, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Guido Martínez
On 7 May 2014 11:45, Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> 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-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
>> Cc: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Cc: Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>
>> Cc: linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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:
>
> Acked-by: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
>
Thanks!
> As a general nitpick it would be nicer if the binding didn't refer to
> the driver and had a description of {half,quarter} period modes inline,
> but that might be a bit tricky and shouldn't block this.
>
I can submit a follow-up patch to clean the binding. It shouldn't be
too hard to re-phrase
the properties so it's clear it's a hardware property.
Dmitry, Do you think you can merge this for v3.16? I've posted a
completely equivalent
patch a while ago [1], which was acked by Daniel, but it was never
merged. Sascha's patch
looks fine as well:
Acked-by: Ezequiel Garcia <ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org>
[1] https://lkml.org/lkml/2013/10/4/167
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
--
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] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
2014-05-07 14:45 ` Mark Rutland
[not found] ` <20140507144543.GE27177-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
@ 2014-05-07 18:59 ` Dmitry Torokhov
2014-05-08 17:01 ` Ezequiel García
1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2014-05-07 18:59 UTC (permalink / raw)
To: Mark Rutland
Cc: Sascha Hauer, linux-input@vger.kernel.org, Daniel Mack,
devicetree@vger.kernel.org, Ezequiel García
On Wed, May 07, 2014 at 03:45:43PM +0100, Mark Rutland wrote:
> Hi,
>
> 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?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
2014-05-07 18:59 ` Dmitry Torokhov
@ 2014-05-08 17:01 ` Ezequiel García
2014-05-19 3:26 ` Ezequiel García
0 siblings, 1 reply; 7+ messages in thread
From: Ezequiel García @ 2014-05-08 17:01 UTC (permalink / raw)
To: Dmitry Torokhov, Mark Rutland
Cc: Sascha Hauer, linux-input@vger.kernel.org, Daniel Mack,
devicetree@vger.kernel.org
On 07 May 11:59 AM, Dmitry Torokhov wrote:
> On Wed, May 07, 2014 at 03:45:43PM +0100, Mark Rutland wrote:
> > Hi,
> >
> > 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...
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
2014-05-08 17:01 ` Ezequiel García
@ 2014-05-19 3:26 ` Ezequiel García
2014-05-19 3:45 ` Dmitry Torokhov
0 siblings, 1 reply; 7+ messages in thread
From: Ezequiel García @ 2014-05-19 3:26 UTC (permalink / raw)
To: Dmitry Torokhov, Mark Rutland
Cc: Sascha Hauer, linux-input@vger.kernel.org, Daniel Mack,
devicetree@vger.kernel.org
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?
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] input: rotary encoder: implement quarter period mode
2014-05-19 3:26 ` Ezequiel García
@ 2014-05-19 3:45 ` Dmitry Torokhov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2014-05-19 3:45 UTC (permalink / raw)
To: Ezequiel García
Cc: Mark Rutland, Sascha Hauer, linux-input@vger.kernel.org,
Daniel Mack, devicetree@vger.kernel.org
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-19 3:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).