From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Rob Herring <robh+dt@kernel.org>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
Sylvain Rochet <sylvain.rochet@finsecur.com>,
Johan Hovold <johan@kernel.org>, Daniel Mack <daniel@zonque.org>,
Rojhalat Ibrahim <imr@rtschenk.de>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH] Input: rotary_encoder - support binary encoding of states
Date: Wed, 23 Mar 2016 07:49:30 +0100 [thread overview]
Message-ID: <20160323064930.GJ6191@pengutronix.de> (raw)
In-Reply-To: <CAL_Jsq++0hPVuqZERsfGRM20F+2rzFUz2CDOR1Kioj0uOaskDQ@mail.gmail.com>
Hello Ezequiel,
On Tue, Mar 22, 2016 at 07:47:06PM -0500, Rob Herring wrote:
> On Tue, Mar 22, 2016 at 5:50 PM, Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar> wrote:
> > (Adding DT people)
Thanks. (I thought addressing the list was enough.)
> > On 22 March 2016 at 18:08, Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de> wrote:
> >> A plain binary encoding has some downsides compared to the usual Gray
> >> encoding, but that doesn't stop hardware engineers to eventually use it.
> >> So implement support for this encoding in the rotary encoder driver.
> >>
> >> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >> ---
> >> Hello,
> >>
> >> an alternative to define this difference in the device tree is to use
> >> something like:
> >>
> >> rotary-encoder,encoding = "binary";
> >>
> >> or
> >>
> >> rotary-encoder,encoding = <ROTARY_ENCODER_ENCODING_BINARY>;
> >>
> >> instead of a property
> >>
> >> rotary-encoder,encoding-binary;
> >>
> >> . While the two first solutions make it obvious that there can only be
> >> one encoding, they IMHO look ugly, so I went for the property without
> >> value. What do you think?
> >>
> >
> > Yes, picking something like:
> >
> > rotary-encoder,encoding = "binary";
> >
> > emphasizing the fact that only one encoding will be used,
> > will work better, scaling well if we need to introduce some
> > "foobar" encoding.
OK, then I stick to strings to not have to introduce magic constants or
cpp symbols?
> Fine, but "rotary-encoder" is not a vendor I've ever heard of. Just
> "encoding" is sufficient.
I picked that to be consistent with rotary-encoder,steps and other
already existing properties documented in
Documentation/devicetree/bindings/input/rotary-encoder.txt.
Should the prefix be dropped for these, too (with compat code)?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
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
next prev parent reply other threads:[~2016-03-23 6:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 21:08 [PATCH] Input: rotary_encoder - support binary encoding of states Uwe Kleine-König
[not found] ` <1458680914-4533-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-03-22 22:50 ` Ezequiel Garcia
2016-03-23 0:47 ` Rob Herring
2016-03-23 6:49 ` Uwe Kleine-König [this message]
2016-03-23 12:46 ` Rob Herring
2016-03-23 13:06 ` Daniel Mack
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=20160323064930.GJ6191@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=imr@rtschenk.de \
--cc=johan@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sylvain.rochet@finsecur.com \
/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).