From: Vignesh R <vigneshr@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Guido Martinez <guido@vanguardiasur.com.ar>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Tony Lindgren <tony@atomide.com>,
Masanari Iida <standby24x7@gmail.com>,
Jonathan Corbet <corbet@lwn.net>, Timo Teras <timo.teras@iki.fi>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Sylvain Rochet <sylvain.rochet@finsecur.com>,
Uwe Kleine-Konig <u.kleine-koenig@pengutronix.de>,
Johan Hovold <johan@kernel.org>, Rob Herring <robh+dt@kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Moritz Fischer <moritz.fischer@ettus.com>linu
Subject: Re: [RFC PATCH 1/2] Input: rotary-encoder- Add support for absolute encoder
Date: Thu, 16 Jun 2016 16:17:11 +0530 [thread overview]
Message-ID: <576283AF.9090107@ti.com> (raw)
In-Reply-To: <574565ED.3060205@ti.com>
Hi Dmitry,
On Wednesday 25 May 2016 02:14 PM, Vignesh R wrote:
> Hi Dmitry,
>
> On 05/23/2016 02:48 PM, R, Vignesh wrote:
>>
>>
>> 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
>>
>
> Could you please comment on how would you like to support above
> described encoder: As a new driver or with existing driver with new
> compatible/mode setting via DT or as suggest by Uwe in another reply?
> IMHO, supporting using existing driver with new mode/compatible string
> looks a better option as the hardware is a kind of rotary-encoder.
>
It would be great if you could comment on how would you like to see
support for absolute rotary-encoder(the one I described above)? As a new
driver or handle it by adding new compatible to existing rotary-encoder
driver?
--
Regards
Vignesh
next prev parent reply other threads:[~2016-06-16 10:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 9:03 [RFC PATCH 0/2] AM335x-ICE: Add support for rotary-encoder Vignesh R
2016-05-19 9:04 ` [RFC PATCH 1/2] Input: rotary-encoder- Add support for absolute encoder Vignesh R
2016-05-19 11:25 ` Krzysztof Kozlowski
2016-05-19 11:44 ` Vignesh R
2016-05-20 16:34 ` Dmitry Torokhov
2016-05-23 9:18 ` R, Vignesh
2016-05-25 8:44 ` Vignesh R
2016-06-16 10:47 ` Vignesh R [this message]
2016-07-19 13:04 ` R, Vignesh
2016-05-20 21:49 ` Rob Herring
2016-05-22 10:26 ` Uwe Kleine-König
2016-05-23 11:18 ` R, Vignesh
[not found] ` <5742E710.9-l0cyMroinI0@public.gmane.org>
2016-05-23 13:18 ` Uwe Kleine-König
2016-05-24 5:09 ` Vignesh R
2016-05-24 8:20 ` Uwe Kleine-König
2016-05-25 8:44 ` Vignesh R
2016-05-19 9:04 ` [RFC PATCH 2/2] ARM: dts: am335x-icev2: Add rotary-encoder node Vignesh R
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=576283AF.9090107@ti.com \
--to=vigneshr@ti.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=geert@linux-m68k.org \
--cc=guido@vanguardiasur.com.ar \
--cc=johan@kernel.org \
--cc=k.kozlowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=moritz.fischer@ettus.com \
--cc=robh+dt@kernel.org \
--cc=standby24x7@gmail.com \
--cc=sylvain.rochet@finsecur.com \
--cc=timo.teras@iki.fi \
--cc=tony@atomide.com \
--cc=u.kleine-koenig@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).