diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-innovator.c')
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index a04e4332915e..e90c137a4cf3 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/input.h> | ||
25 | 26 | ||
26 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
@@ -34,8 +35,22 @@ | |||
34 | #include <asm/arch/gpio.h> | 35 | #include <asm/arch/gpio.h> |
35 | #include <asm/arch/tc.h> | 36 | #include <asm/arch/tc.h> |
36 | #include <asm/arch/usb.h> | 37 | #include <asm/arch/usb.h> |
38 | #include <asm/arch/keypad.h> | ||
37 | #include <asm/arch/common.h> | 39 | #include <asm/arch/common.h> |
38 | 40 | ||
41 | static int innovator_keymap[] = { | ||
42 | KEY(0, 0, KEY_F1), | ||
43 | KEY(0, 3, KEY_DOWN), | ||
44 | KEY(1, 1, KEY_F2), | ||
45 | KEY(1, 2, KEY_RIGHT), | ||
46 | KEY(2, 0, KEY_F3), | ||
47 | KEY(2, 1, KEY_F4), | ||
48 | KEY(2, 2, KEY_UP), | ||
49 | KEY(3, 2, KEY_ENTER), | ||
50 | KEY(3, 3, KEY_LEFT), | ||
51 | 0 | ||
52 | }; | ||
53 | |||
39 | static struct mtd_partition innovator_partitions[] = { | 54 | static struct mtd_partition innovator_partitions[] = { |
40 | /* bootloader (U-Boot, etc) in first sector */ | 55 | /* bootloader (U-Boot, etc) in first sector */ |
41 | { | 56 | { |
@@ -97,6 +112,31 @@ static struct platform_device innovator_flash_device = { | |||
97 | .resource = &innovator_flash_resource, | 112 | .resource = &innovator_flash_resource, |
98 | }; | 113 | }; |
99 | 114 | ||
115 | static struct resource innovator_kp_resources[] = { | ||
116 | [0] = { | ||
117 | .start = INT_KEYBOARD, | ||
118 | .end = INT_KEYBOARD, | ||
119 | .flags = IORESOURCE_IRQ, | ||
120 | }, | ||
121 | }; | ||
122 | |||
123 | static struct omap_kp_platform_data innovator_kp_data = { | ||
124 | .rows = 8, | ||
125 | .cols = 8, | ||
126 | .keymap = innovator_keymap, | ||
127 | }; | ||
128 | |||
129 | static struct platform_device innovator_kp_device = { | ||
130 | .name = "omap-keypad", | ||
131 | .id = -1, | ||
132 | .dev = { | ||
133 | .platform_data = &innovator_kp_data, | ||
134 | }, | ||
135 | .num_resources = ARRAY_SIZE(innovator_kp_resources), | ||
136 | .resource = innovator_kp_resources, | ||
137 | }; | ||
138 | |||
139 | |||
100 | #ifdef CONFIG_ARCH_OMAP15XX | 140 | #ifdef CONFIG_ARCH_OMAP15XX |
101 | 141 | ||
102 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 142 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
@@ -129,9 +169,16 @@ static struct platform_device innovator1510_smc91x_device = { | |||
129 | .resource = innovator1510_smc91x_resources, | 169 | .resource = innovator1510_smc91x_resources, |
130 | }; | 170 | }; |
131 | 171 | ||
172 | static struct platform_device innovator1510_lcd_device = { | ||
173 | .name = "lcd_inn1510", | ||
174 | .id = -1, | ||
175 | }; | ||
176 | |||
132 | static struct platform_device *innovator1510_devices[] __initdata = { | 177 | static struct platform_device *innovator1510_devices[] __initdata = { |
133 | &innovator_flash_device, | 178 | &innovator_flash_device, |
134 | &innovator1510_smc91x_device, | 179 | &innovator1510_smc91x_device, |
180 | &innovator_kp_device, | ||
181 | &innovator1510_lcd_device, | ||
135 | }; | 182 | }; |
136 | 183 | ||
137 | #endif /* CONFIG_ARCH_OMAP15XX */ | 184 | #endif /* CONFIG_ARCH_OMAP15XX */ |
@@ -158,9 +205,16 @@ static struct platform_device innovator1610_smc91x_device = { | |||
158 | .resource = innovator1610_smc91x_resources, | 205 | .resource = innovator1610_smc91x_resources, |
159 | }; | 206 | }; |
160 | 207 | ||
208 | static struct platform_device innovator1610_lcd_device = { | ||
209 | .name = "inn1610_lcd", | ||
210 | .id = -1, | ||
211 | }; | ||
212 | |||
161 | static struct platform_device *innovator1610_devices[] __initdata = { | 213 | static struct platform_device *innovator1610_devices[] __initdata = { |
162 | &innovator_flash_device, | 214 | &innovator_flash_device, |
163 | &innovator1610_smc91x_device, | 215 | &innovator1610_smc91x_device, |
216 | &innovator_kp_device, | ||
217 | &innovator1610_lcd_device, | ||
164 | }; | 218 | }; |
165 | 219 | ||
166 | #endif /* CONFIG_ARCH_OMAP16XX */ | 220 | #endif /* CONFIG_ARCH_OMAP16XX */ |
@@ -206,7 +260,6 @@ static struct omap_usb_config innovator1510_usb_config __initdata = { | |||
206 | }; | 260 | }; |
207 | 261 | ||
208 | static struct omap_lcd_config innovator1510_lcd_config __initdata = { | 262 | static struct omap_lcd_config innovator1510_lcd_config __initdata = { |
209 | .panel_name = "inn1510", | ||
210 | .ctrl_name = "internal", | 263 | .ctrl_name = "internal", |
211 | }; | 264 | }; |
212 | #endif | 265 | #endif |
@@ -228,7 +281,6 @@ static struct omap_usb_config h2_usb_config __initdata = { | |||
228 | }; | 281 | }; |
229 | 282 | ||
230 | static struct omap_lcd_config innovator1610_lcd_config __initdata = { | 283 | static struct omap_lcd_config innovator1610_lcd_config __initdata = { |
231 | .panel_name = "inn1610", | ||
232 | .ctrl_name = "internal", | 284 | .ctrl_name = "internal", |
233 | }; | 285 | }; |
234 | #endif | 286 | #endif |