ARM: dts: gose: Configure pull-up for SOFT_SW GPIO keys
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 30 Apr 2021 13:10:54 +0000 (15:10 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 31 May 2021 08:45:41 +0000 (10:45 +0200)
The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
not have external pull-up resistors, but rely on internal pull-ups being
enabled.  Fortunately this is satisfied by the initial state of these
pins.

Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.

While at it, rename the surrounding device node from "gpio-keys" to
"keyboard", to comply with generic node name recommendations.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1cdec892b1491309b12bdaf7bc8428b3a19b1ed5.1619785905.git.geert+renesas@glider.be
arch/arm/boot/dts/r8a7793-gose.dts

index 87fa57a..479e0fd 100644 (file)
                reg = <0 0x40000000 0 0x40000000>;
        };
 
-       gpio-keys {
+       keyboard {
                compatible = "gpio-keys";
 
+               pinctrl-0 = <&keyboard_pins>;
+               pinctrl-names = "default";
+
                key-1 {
                        gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_1>;
                function = "audio_clk";
        };
 
+       keyboard_pins: keyboard {
+               pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
+               bias-pull-up;
+       };
+
        vin0_pins: vin0 {
                groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
                function = "vin0";