linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] input: Simplifying the rotary encoder devicetree binding
@ 2015-10-09 13:46 Ezequiel Garcia
       [not found] ` <1444398416-3073-1-git-send-email-ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ezequiel Garcia @ 2015-10-09 13:46 UTC (permalink / raw)
  To: linux-input, devicetree
  Cc: Dmitry Torokhov, Daniel Mack, Sascha Hauer, mark.rutland, robh+dt,
	pawel.moll, ijc+devicetree, galak, ariel, Ezequiel Garcia

Hi Dmitry,

This patchset is another attempt at supporting rotary encoders
with stable state on each output states. Previous efforts to
support this has been done by Sascha Hauer [1] and myself [2].

After some discussion we agreed to remove the current ad-hoc
bindings for each of the rotary-encoders types, and instead
introduce "one binding to rule them all".

This patchset introduces a new 'steps-per-period' property.
Such a property can be used to model the three types
of rotary-encoders.

>From the GPIO output diagram, we can see where these types
come from, and how the steps-per-period describes each
of them.

                  _____       _____       _____
                 |     |     |     |     |     |
  Channel A  ____|     |_____|     |_____|     |____

                 :  :  :  :  :  :  :  :  :  :  :  :
            __       _____       _____       _____
              |     |     |     |     |     |     |
  Channel B   |_____|     |_____|     |_____|     |__

                 :  :  :  :  :  :  :  :  :  :  :  :
  Event          a  b  c  d  a  b  c  d  a  b  c  d

                |<-------->|
                  one step, steps-per-period = 1

                |<-->|
                  one step, steps-per-period = 2

                |<>|
                  one step, steps-per-period = 4

The 'half-period' property is marked as deprecated and a
warning message is issued if it's used, although the driver
retains its old behavior.

I'm also submitting Ben Gamari's cleanup, with the commit log
slightly ammended.

Feedback welcome!

[1] http://www.spinics.net/lists/linux-input/msg28701.html
[2] http://www.spinics.net/lists/linux-input/msg27644.html

Ben Gamari (1):
  input: rotary-encoder: Use of_property_read_bool

Ezequiel Garcia (2):
  input: rotary-encoder: Introduce new 'steps-per-period' property
  input: rotary-encoder: Support 'steps-per-period' DT property

 .../devicetree/bindings/input/rotary-encoder.txt   |  9 +++
 Documentation/input/rotary-encoder.txt             |  8 +-
 drivers/input/misc/rotary_encoder.c                | 94 +++++++++++++++++++---
 include/linux/rotary_encoder.h                     |  2 +-
 4 files changed, 101 insertions(+), 12 deletions(-)

-- 
2.5.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-15 18:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 13:46 [PATCH 0/3] input: Simplifying the rotary encoder devicetree binding Ezequiel Garcia
     [not found] ` <1444398416-3073-1-git-send-email-ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org>
2015-10-09 13:46   ` [PATCH 1/3] input: rotary-encoder: Use of_property_read_bool Ezequiel Garcia
2015-10-09 13:46 ` [PATCH 2/3] input: rotary-encoder: Introduce new 'steps-per-period' property Ezequiel Garcia
2015-10-09 13:57   ` Rob Herring
2015-10-09 14:13     ` Ezequiel Garcia
2015-10-09 13:46 ` [PATCH 3/3] input: rotary-encoder: Support 'steps-per-period' DT property Ezequiel Garcia
2015-10-14  6:55   ` Dmitry Torokhov
2015-10-15 18:49     ` Ezequiel Garcia

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).