ARM: dts: kirkwood: Fix Openblock A6 external GPIO pins
authorJason Cooper <jason@lakedaemon.net>
Mon, 15 Aug 2016 14:51:04 +0000 (14:51 +0000)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Fri, 26 Aug 2016 09:08:32 +0000 (11:08 +0200)
By assigning the pin hog to the pinctrl node, we correctly configure the
MPPs.  However, they are not available to userspace.

Fix this by assigning the hogs to the gpio node.

After this, the following works as expected:

  # echo 28 >/sys/class/gpio/export
  # echo low >/sys/class/gpio/gpio28/direction

[gregory.clement@free-electrons.com: fix title]
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
arch/arm/boot/dts/kirkwood-openblocks_a6.dts

index 0db0e3edc88fc13f50b243af4012ed55aceb9b8f..94e49f32d5f9264e534561bf06dd0a840be6ff3e 100644 (file)
@@ -41,7 +41,7 @@
                };
 
                pinctrl: pin-controller@10000 {
-                       pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
+                       pinctrl-0 = <&pmx_dip_switches>;
                        pinctrl-names = "default";
 
                        pmx_uart0: pmx-uart0 {
                phy-handle = <&ethphy0>;
        };
 };
+
+&gpio0 {
+       status = "okay";
+
+       pinctrl-0 = <&pmx_gpio_header>;
+       pinctrl-names = "default";
+};