@@ -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 */
+ >;
+
};
};