diff options
author | Shubhrajyoti Datta <shubhrajyoti@ti.com> | 2011-07-05 06:38:24 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-07-05 06:38:24 -0400 |
commit | f67df6c670a8fcd3f63728afa2314e7eca653bd7 (patch) | |
tree | 86cc2cb8cea53d40c8d9abcd9fa03f30bcdde63c /arch/arm/mach-omap2/board-4430sdp.c | |
parent | 6de8bae86c0459a881cead6735cd6971334cadd3 (diff) |
OMAP4: Keyboard: Mux changes in the board file
The mux settings for keypad are done for omap4430sdp in
board file.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
[tony@atomide.com: improved formatting a bit]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index e5e8bbb00359..f6efff5f1650 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -129,6 +129,64 @@ static const int sdp4430_keymap[] = { | |||
129 | KEY(7, 6, KEY_OK), | 129 | KEY(7, 6, KEY_OK), |
130 | KEY(7, 7, KEY_DOWN), | 130 | KEY(7, 7, KEY_DOWN), |
131 | }; | 131 | }; |
132 | static struct omap_device_pad keypad_pads[] __initdata = { | ||
133 | { .name = "kpd_col1.kpd_col1", | ||
134 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
135 | }, | ||
136 | { .name = "kpd_col1.kpd_col1", | ||
137 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
138 | }, | ||
139 | { .name = "kpd_col2.kpd_col2", | ||
140 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
141 | }, | ||
142 | { .name = "kpd_col3.kpd_col3", | ||
143 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
144 | }, | ||
145 | { .name = "kpd_col4.kpd_col4", | ||
146 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
147 | }, | ||
148 | { .name = "kpd_col5.kpd_col5", | ||
149 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
150 | }, | ||
151 | { .name = "gpmc_a23.kpd_col7", | ||
152 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
153 | }, | ||
154 | { .name = "gpmc_a22.kpd_col6", | ||
155 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
156 | }, | ||
157 | { .name = "kpd_row0.kpd_row0", | ||
158 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
159 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
160 | }, | ||
161 | { .name = "kpd_row1.kpd_row1", | ||
162 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
163 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
164 | }, | ||
165 | { .name = "kpd_row2.kpd_row2", | ||
166 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
167 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
168 | }, | ||
169 | { .name = "kpd_row3.kpd_row3", | ||
170 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
171 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
172 | }, | ||
173 | { .name = "kpd_row4.kpd_row4", | ||
174 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
175 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
176 | }, | ||
177 | { .name = "kpd_row5.kpd_row5", | ||
178 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
179 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
180 | }, | ||
181 | { .name = "gpmc_a18.kpd_row6", | ||
182 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
183 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
184 | }, | ||
185 | { .name = "gpmc_a19.kpd_row7", | ||
186 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
187 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
188 | }, | ||
189 | }; | ||
132 | 190 | ||
133 | static struct matrix_keymap_data sdp4430_keymap_data = { | 191 | static struct matrix_keymap_data sdp4430_keymap_data = { |
134 | .keymap = sdp4430_keymap, | 192 | .keymap = sdp4430_keymap, |
@@ -140,6 +198,13 @@ static struct omap4_keypad_platform_data sdp4430_keypad_data = { | |||
140 | .rows = 8, | 198 | .rows = 8, |
141 | .cols = 8, | 199 | .cols = 8, |
142 | }; | 200 | }; |
201 | |||
202 | static struct omap_board_data keypad_data = { | ||
203 | .id = 1, | ||
204 | .pads = keypad_pads, | ||
205 | .pads_cnt = ARRAY_SIZE(keypad_pads), | ||
206 | }; | ||
207 | |||
143 | static struct gpio_led sdp4430_gpio_leds[] = { | 208 | static struct gpio_led sdp4430_gpio_leds[] = { |
144 | { | 209 | { |
145 | .name = "omap4:green:debug0", | 210 | .name = "omap4:green:debug0", |
@@ -825,7 +890,7 @@ static void __init omap_4430sdp_init(void) | |||
825 | ARRAY_SIZE(sdp4430_spi_board_info)); | 890 | ARRAY_SIZE(sdp4430_spi_board_info)); |
826 | } | 891 | } |
827 | 892 | ||
828 | status = omap4_keyboard_init(&sdp4430_keypad_data); | 893 | status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); |
829 | if (status) | 894 | if (status) |
830 | pr_err("Keypad initialization failed: %d\n", status); | 895 | pr_err("Keypad initialization failed: %d\n", status); |
831 | 896 | ||