[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5742CB03.8010805@ti.com>
Date: Mon, 23 May 2016 14:48:59 +0530
From: "R, Vignesh" <vigneshr@...com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: Rob Herring <robh+dt@...nel.org>, Tony Lindgren <tony@...mide.com>,
Jonathan Corbet <corbet@....net>,
Johan Hovold <johan@...nel.org>,
Sylvain Rochet <sylvain.rochet@...secur.com>,
Masanari Iida <standby24x7@...il.com>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
S Twiss <stwiss.opensource@...semi.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Moritz Fischer <moritz.fischer@...us.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Timo Teras <timo.teras@....fi>,
Guido Martinez <guido@...guardiasur.com.ar>,
Clifton Barnes <clifton.a.barnes@...il.com>,
Uwe Kleine-Konig <u.kleine-koenig@...gutronix.de>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC PATCH 1/2] Input: rotary-encoder- Add support for absolute
encoder
On 5/20/2016 10:04 PM, Dmitry Torokhov wrote:
> On Thu, May 19, 2016 at 02:34:00PM +0530, Vignesh R wrote:
>> There are rotary-encoders where GPIO lines reflect the actual position
>> of the rotary encoder dial. For example, if dial points to 9, then four
>> GPIO lines connected to the rotary encoder will read HLLH(1001b = 9).
>> Add support for such rotary-encoder.
>> The driver relies on rotary-encoder,absolute-encoder DT property to
>> detect such encoders.
>> Since, GPIO IRQs are not necessary to work with
>> such encoders, optional polling mode support is added using
>> input_poll_dev skeleton. This is can be used by enabling
>> CONFIG_INPUT_GPIO_ROTARY_ENCODER_POLL_MODE_SUPPORT.
>
> Does this really belong to a rotary encoder and not a new driver that
> simply translates gpio-encoded value into ABS* event?
>
Currently rotary encoder driver only supports incremental/step counting
rotary devices. However, the device that is there on am335x-ice is an
absolute encoder but, IMO, nevertheless a kind of rotary encoder. The
only difference is that there is no need to count steps and the absolute
position value is always available as binary encoded state of connected
GPIOs.
The hardware on am335x-ice is a mechanical rotary encoder switch
connected over 4 GPIOs. It is same as binary encoder described at [1]
(except there are 4 GPIO lines), so this lead me to add support in
rotary-encoder.
[1]https://en.wikipedia.org/wiki/Rotary_encoder#Standard_binary_encoding
Powered by blists - more mailing lists