Re: [PATCH 2/2] input: gpio-keys: add support to name the gpio-keys
flat view
From: Linus Walleij <hidden>
Date: 2016-01-14 09:18:54
Also in:
linux-devicetree, lkml
On Tue, Jan 12, 2016 at 4:24 PM, Laxman Dewangan [off-list ref] wrote:
On Tuesday 12 January 2016 08:53 PM, Rob Herring wrote:quoted
On Tue, Jan 12, 2016 at 8:55 AM, Laxman Dewangan [off-list ref] wrote:quoted
On Tuesday 12 January 2016 08:13 PM, Rob Herring wrote:quoted
On Tue, Jan 12, 2016 at 05:02:50PM +0530, Laxman Dewangan wrote:quoted
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