[PATCH v2 3/4] ARM: dts: am335x: Guardian: add keymap to mt matrix keypad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gireesh Hiremath <Gireesh.Hiremath@xxxxxxxxxxxx>

add linux,keymap to mt matrix keypad

Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@xxxxxxxxxxxx>
---
Changes since v1:
	- updated node names

 arch/arm/boot/dts/am335x-guardian.dts | 44 ++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-guardian.dts b/arch/arm/boot/dts/am335x-guardian.dts
index 94d9e51cd0f9..a172d0e2842f 100644
--- a/arch/arm/boot/dts/am335x-guardian.dts
+++ b/arch/arm/boot/dts/am335x-guardian.dts
@@ -120,20 +120,48 @@
 		regulator-max-microvolt = <3300000>;
 	};
 
-	mt_keypad: mt_keypad@0 {
-		compatible = "gpio-mt-keypad";
+	keypad {
+		compatible = "gpio-mt-matrix-keypad";
 		debounce-delay-ms = <10>;
 		col-scan-delay-us = <2>;
-		keypad,num-lines = <5>;
+		number-of-buttons = <7>;
 		linux,no-autorepeat;
 		gpio-activelow;
 		line-gpios = <
-			&gpio1 24 GPIO_ACTIVE_LOW    /*gpio_56*/
-			&gpio1 23 GPIO_ACTIVE_LOW    /*gpio_55*/
-			&gpio1 22 GPIO_ACTIVE_LOW    /*gpio_54*/
-			&gpio1 20 GPIO_ACTIVE_LOW    /*gpio_52*/
-			&gpio1 16 GPIO_ACTIVE_LOW    /*gpio_48*/
+			&gpio1 24 1	/*gpio_56*/
+			&gpio1 23 1	/*gpio_55*/
+			&gpio1 22 1	/*gpio_54*/
+			&gpio1 20 1	/*gpio_52*/
+			&gpio1 16 1	/*gpio_48*/
 		>;
+		linux,keymap = <
+			0x00000000 /* row 0, col 0, KEY_RESERVED */
+			0x0001000a /* row 0, col 1, KEY_9 */
+			0x00020003 /* row 0, col 2, KEY_2 */
+			0x00030000 /* row 0, col 3, KEY_RESERVED */
+			0x00040002 /* row 0, col 4, KEY_1 */
+			0x0100000a /* row 1, col 0, KEY_9 */
+			0x01010000 /* row 1, col 1, KEY_RESERVED */
+			0x01020007 /* row 1, col 2, KEY_6 */
+			0x01030000 /* row 1, col 3, KEY_RESERVED */
+			0x01040000 /* row 1, col 4, KEY_RESERVED */
+			0x02000003 /* row 2, col 0, KEY_2 */
+			0x02010007 /* row 2, col 1, KEY_6 */
+			0x02020000 /* row 2, col 2, KEY_RESERVED */
+			0x02030005 /* row 2, col 3, KEY_4 */
+			0x02040008 /* row 2, col 4, KEY_7 */
+			0x03000000 /* row 3, col 0, KEY_RESERVED */
+			0x03010000 /* row 3, col 1, KEY_RESERVED */
+			0x03020005 /* row 3, col 2, KEY_4 */
+			0x03030000 /* row 3, col 3, KEY_RESERVED */
+			0x03040009 /* row 3, col 4, KEY_8 */
+			0x04000002 /* row 4, col 0, KEY_1 */
+			0x04010000 /* row 4, col 1, KEY_RESERVED */
+			0x04020008 /* row 4, col 2, KEY_7 */
+			0x04030009 /* row 4, col 3, KEY_8 */
+			0x04040000 /* row 4, col 4, KEY_RESERVED */
+		>;
+
 	};
 };
 
-- 
2.20.1




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux