From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] Input: rotary_encoder - support binary encoding of states Date: Wed, 23 Mar 2016 07:49:30 +0100 Message-ID: <20160323064930.GJ6191@pengutronix.de> References: <1458680914-4533-1-git-send-email-u.kleine-koenig@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org To: Rob Herring Cc: Ezequiel Garcia , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , Dmitry Torokhov , "kernel@pengutronix.de" , Sylvain Rochet , Johan Hovold , Daniel Mack , Rojhalat Ibrahim , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala List-Id: devicetree@vger.kernel.org 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 > wrote: > > (Adding DT people) Thanks. (I thought addressing the list was enough.) > > On 22 March 2016 at 18:08, Uwe Kleine-K=F6nig > > wrote: > >> A plain binary encoding has some downsides compared to the usual G= ray > >> encoding, but that doesn't stop hardware engineers to eventually u= se it. > >> So implement support for this encoding in the rotary encoder drive= r. > >> > >> Signed-off-by: Uwe Kleine-K=F6nig > >> --- > >> Hello, > >> > >> an alternative to define this difference in the device tree is to = use > >> something like: > >> > >> rotary-encoder,encoding =3D "binary"; > >> > >> or > >> > >> rotary-encoder,encoding =3D ; > >> > >> instead of a property > >> > >> rotary-encoder,encoding-binary; > >> > >> . While the two first solutions make it obvious that there can onl= y be > >> one encoding, they IMHO look ugly, so I went for the property with= out > >> value. What do you think? > >> > > > > Yes, picking something like: > > > > rotary-encoder,encoding =3D "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 --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig = | 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