diff options
author | Alberto Panizzo <maramaopercheseimorto@gmail.com> | 2010-05-19 05:34:43 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-05-19 08:22:44 -0400 |
commit | 54c1f6367c2836a85e821a010085ed04ab2235bc (patch) | |
tree | 6af22ae95985a46f9badf0d589dfc68cd76ecdf2 /arch/arm/mach-mx3 | |
parent | b1e89955be882bab65997c2227872211f805be80 (diff) |
mx31_3ds: Support the keypad situated in the personality board
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31_3ds.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 55d6117fbae9..58e57291b79d 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/regulator/machine.h> | 29 | #include <linux/regulator/machine.h> |
30 | #include <linux/fsl_devices.h> | 30 | #include <linux/fsl_devices.h> |
31 | #include <linux/input/matrix_keypad.h> | ||
31 | 32 | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
@@ -82,6 +83,35 @@ static int mx31_3ds_pins[] = { | |||
82 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, | 83 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, |
83 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, | 84 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, |
84 | MX31_PIN_USBOTG_STP__USBOTG_STP, | 85 | MX31_PIN_USBOTG_STP__USBOTG_STP, |
86 | /*Keyboard*/ | ||
87 | MX31_PIN_KEY_ROW0_KEY_ROW0, | ||
88 | MX31_PIN_KEY_ROW1_KEY_ROW1, | ||
89 | MX31_PIN_KEY_ROW2_KEY_ROW2, | ||
90 | MX31_PIN_KEY_COL0_KEY_COL0, | ||
91 | MX31_PIN_KEY_COL1_KEY_COL1, | ||
92 | MX31_PIN_KEY_COL2_KEY_COL2, | ||
93 | MX31_PIN_KEY_COL3_KEY_COL3, | ||
94 | }; | ||
95 | |||
96 | /* | ||
97 | * Matrix keyboard | ||
98 | */ | ||
99 | |||
100 | static const uint32_t mx31_3ds_keymap[] = { | ||
101 | KEY(0, 0, KEY_UP), | ||
102 | KEY(0, 1, KEY_DOWN), | ||
103 | KEY(1, 0, KEY_RIGHT), | ||
104 | KEY(1, 1, KEY_LEFT), | ||
105 | KEY(1, 2, KEY_ENTER), | ||
106 | KEY(2, 0, KEY_F6), | ||
107 | KEY(2, 1, KEY_F8), | ||
108 | KEY(2, 2, KEY_F9), | ||
109 | KEY(2, 3, KEY_F10), | ||
110 | }; | ||
111 | |||
112 | static struct matrix_keymap_data mx31_3ds_keymap_data = { | ||
113 | .keymap = mx31_3ds_keymap, | ||
114 | .keymap_size = ARRAY_SIZE(mx31_3ds_keymap), | ||
85 | }; | 115 | }; |
86 | 116 | ||
87 | /* Regulators */ | 117 | /* Regulators */ |
@@ -367,6 +397,8 @@ static void __init mxc_board_init(void) | |||
367 | spi_register_board_info(mx31_3ds_spi_devs, | 397 | spi_register_board_info(mx31_3ds_spi_devs, |
368 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 398 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
369 | 399 | ||
400 | mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data); | ||
401 | |||
370 | mx31_3ds_usbotg_init(); | 402 | mx31_3ds_usbotg_init(); |
371 | mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata); | 403 | mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata); |
372 | 404 | ||