ARM: dts: cm-t3x30: add keypad support
authorDmitry Lifshitz <lifshitz@compulab.co.il>
Tue, 18 Nov 2014 09:13:24 +0000 (11:13 +0200)
committerTony Lindgren <tony@atomide.com>
Sat, 22 Nov 2014 00:27:22 +0000 (16:27 -0800)
Add twl4030 matrtix keypad support.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap3-cm-t3x30.dtsi

index 25ba083..3cbaf98 100644 (file)
@@ -64,6 +64,7 @@
 
 #include "twl4030.dtsi"
 #include "twl4030_omap3.dtsi"
+#include <dt-bindings/input/input.h>
 
 &mmc1 {
        vmmc-supply = <&vmmc1>;
        ti,pullups = <0x000001>;
 };
 
+&twl_keypad {
+       linux,keymap = <
+                               MATRIX_KEY(0x00, 0x01, KEY_A)
+                               MATRIX_KEY(0x00, 0x02, KEY_B)
+                               MATRIX_KEY(0x00, 0x03, KEY_LEFT)
+
+                               MATRIX_KEY(0x01, 0x01, KEY_UP)
+                               MATRIX_KEY(0x01, 0x02, KEY_ENTER)
+                               MATRIX_KEY(0x01, 0x03, KEY_DOWN)
+
+                               MATRIX_KEY(0x02, 0x01, KEY_RIGHT)
+                               MATRIX_KEY(0x02, 0x02, KEY_C)
+                               MATRIX_KEY(0x02, 0x03, KEY_D)
+                       >;
+};
+
 &hsusb1_phy {
        reset-gpios = <&twl_gpio 6 GPIO_ACTIVE_LOW>;
 };