Re: [PATCH 2/2] input: gpio-keys: add support to name the gpio-keys

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

 




On Tue, Jan 12, 2016 at 4:24 PM, Laxman Dewangan <ldewangan@xxxxxxxxxx> wrote:
> On Tuesday 12 January 2016 08:53 PM, Rob Herring wrote:
>> On Tue, Jan 12, 2016 at 8:55 AM, Laxman Dewangan <ldewangan@xxxxxxxxxx>
>> wrote:
>>>
>>> On Tuesday 12 January 2016 08:13 PM, Rob Herring wrote:
>>>>
>>>> On Tue, Jan 12, 2016 at 05:02:50PM +0530, Laxman Dewangan wrote:
>
>
>> So label is exactly for this purpose of defining user meaningful names.
>>
> Yes, I can use the label for name. I will update the patch.
>
> Just for understanding, is "label" is better property name to pass the
> specific name?

Yes, look at this from
arch/arm64/boot/dts/arm/juno-motherboard.dtsi:

                        gpio_keys {
                                compatible = "gpio-keys";
                                #address-cells = <1>;
                                #size-cells = <0>;

                                button@1 {
                                        debounce_interval = <50>;
                                        wakeup-source;
                                        linux,code = <116>;
                                        label = "POWER";
                                        gpios = <&iofpga_gpio0 0 0x4>;
                                };
                                button@2 {
                                        debounce_interval = <50>;
                                        wakeup-source;
                                        linux,code = <102>;
                                        label = "HOME";
                                        gpios = <&iofpga_gpio0 1 0x4>;
                                };
(...)

Currently these names (POWER, HOME etc) appear nicely in
/proc/interrupts, so I guess the same should be used for input?

Yours,
Linus Walleij
--
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