Re: [PATCH] Input: rotary_encoder - support binary encoding of states

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Mar 22, 2016 at 5:50 PM, Ezequiel Garcia
<ezequiel@xxxxxxxxxxxxxxxxxxxx> wrote:
> (Adding DT people)
>
> On 22 March 2016 at 18:08, Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
>> ---
>> 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.

Fine, but "rotary-encoder" is not a vendor I've ever heard of. Just
"encoding" is sufficient.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux