ARM: shmobile: Enable DSW2 with gpio-keys on KZM9D
authorMagnus Damm <damm@opensource.se>
Wed, 13 Nov 2013 23:03:45 +0000 (08:03 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 10 Dec 2013 08:27:15 +0000 (17:27 +0900)
Use the gpio-keys driver to support the 4 pins on the
dip switch DSW2 which is mounted on the KZM9D board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/emev2-kzm9d.dts
arch/arm/boot/dts/emev2.dtsi

index 861aa7d6fc7dbc480c0b9d6b185d6a291d38fcd2..baaa66cc39bfb4a4e2faabf2edc273778006faa2 100644 (file)
@@ -9,7 +9,9 @@
  */
 /dts-v1/;
 
-/include/ "emev2.dtsi"
+#include "emev2.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "EMEV2 KZM9D Board";
                vddvario-supply = <&reg_1p8v>;
                vdd33a-supply = <&reg_3p3v>;
        };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               button@1 {
+                       debounce_interval = <50>;
+                       wakeup = <1>;
+                       label = "DSW2-1";
+                       linux,code = <KEY_1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+               };
+               button@2 {
+                       debounce_interval = <50>;
+                       wakeup = <1>;
+                       label = "DSW2-2";
+                       linux,code = <KEY_2>;
+                       gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
+               };
+               button@3 {
+                       debounce_interval = <50>;
+                       wakeup = <1>;
+                       label = "DSW2-3";
+                       linux,code = <KEY_3>;
+                       gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+               };
+               button@4 {
+                       debounce_interval = <50>;
+                       wakeup = <1>;
+                       label = "DSW2-4";
+                       linux,code = <KEY_4>;
+                       gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+               };
+       };
 };
index df1d4cd3917d1d5fc6f53256d6c403e3fe0b63f6..256c2f8b9d0a859ce11d6e10f2f30d1ae2ecbc7c 100644 (file)
@@ -8,7 +8,7 @@
  * kind, whether express or implied.
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
        compatible = "renesas,emev2";