aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-28 12:04:33 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-05-19 07:11:06 -0400
commit5309498a56842d0acb723196b7bc57bfb9aee918 (patch)
treeabc5ff4565e8578a229cdc8924775c5ceb6e9b6a /arch
parent9c97f66271a09dedfe26a145fceb74c6efd83571 (diff)
ARM: imx: use imx_add_gpio_keys to register "gpio-keys" devices
LAKML-Reference: 1302207841-12450-1-git-send-email-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/Kconfig2
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c15
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c14
-rw-r--r--arch/arm/mach-mx3/Kconfig4
-rw-r--r--arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c15
-rw-r--r--arch/arm/mach-mx3/mach-armadillo5x0.c15
-rw-r--r--arch/arm/mach-mx3/mach-pcm037_eet.c15
-rw-r--r--arch/arm/mach-mx3/mach-vpr200.c12
-rw-r--r--arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c15
9 files changed, 27 insertions, 80 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 56b930a13443..4ac00e9fdbe8 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -129,6 +129,7 @@ choice
129 129
130config MACH_EUKREA_MBIMXSD25_BASEBOARD 130config MACH_EUKREA_MBIMXSD25_BASEBOARD
131 bool "Eukrea MBIMXSD development board" 131 bool "Eukrea MBIMXSD development board"
132 select IMX_HAVE_PLATFORM_GPIO_KEYS
132 select IMX_HAVE_PLATFORM_IMX_SSI 133 select IMX_HAVE_PLATFORM_IMX_SSI
133 help 134 help
134 This adds board specific devices that can be found on Eukrea's 135 This adds board specific devices that can be found on Eukrea's
@@ -254,6 +255,7 @@ config MACH_MX27_3DS
254config MACH_IMX27_VISSTRIM_M10 255config MACH_IMX27_VISSTRIM_M10
255 bool "Vista Silicon i.MX27 Visstrim_m10" 256 bool "Vista Silicon i.MX27 Visstrim_m10"
256 select SOC_IMX27 257 select SOC_IMX27
258 select IMX_HAVE_PLATFORM_GPIO_KEYS
257 select IMX_HAVE_PLATFORM_IMX_I2C 259 select IMX_HAVE_PLATFORM_IMX_I2C
258 select IMX_HAVE_PLATFORM_IMX_SSI 260 select IMX_HAVE_PLATFORM_IMX_SSI
259 select IMX_HAVE_PLATFORM_IMX_UART 261 select IMX_HAVE_PLATFORM_IMX_UART
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index 6269053505f7..176e61bf44b6 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -22,7 +22,6 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/gpio_keys.h>
26#include <linux/input.h> 25#include <linux/input.h>
27#include <video/platform_lcd.h> 26#include <video/platform_lcd.h>
28 27
@@ -208,23 +207,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
208 }, 207 },
209}; 208};
210 209
211static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { 210static const struct gpio_keys_platform_data
211 eukrea_mbimxsd_button_data __initconst = {
212 .buttons = eukrea_mbimxsd_gpio_buttons, 212 .buttons = eukrea_mbimxsd_gpio_buttons,
213 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), 213 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
214}; 214};
215 215
216static struct platform_device eukrea_mbimxsd_button_device = {
217 .name = "gpio-keys",
218 .id = -1,
219 .num_resources = 0,
220 .dev = {
221 .platform_data = &eukrea_mbimxsd_button_data,
222 }
223};
224
225static struct platform_device *platform_devices[] __initdata = { 216static struct platform_device *platform_devices[] __initdata = {
226 &eukrea_mbimxsd_leds_gpio, 217 &eukrea_mbimxsd_leds_gpio,
227 &eukrea_mbimxsd_button_device,
228 &eukrea_mbimxsd_lcd_powerdev, 218 &eukrea_mbimxsd_lcd_powerdev,
229}; 219};
230 220
@@ -299,4 +289,5 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
299 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 289 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
300 290
301 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 291 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
292 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
302} 293}
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index d7e0d219726a..7ae43b1ec517 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -27,7 +27,6 @@
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/i2c/pca953x.h>
30#include <linux/gpio_keys.h>
31#include <linux/input.h> 30#include <linux/input.h>
32#include <linux/gpio.h> 31#include <linux/gpio.h>
33#include <linux/delay.h> 32#include <linux/delay.h>
@@ -130,19 +129,12 @@ static struct gpio_keys_button visstrim_gpio_keys[] = {
130 } 129 }
131}; 130};
132 131
133static struct gpio_keys_platform_data visstrim_gpio_keys_platform_data = { 132static const struct gpio_keys_platform_data
133 visstrim_gpio_keys_platform_data __initconst = {
134 .buttons = visstrim_gpio_keys, 134 .buttons = visstrim_gpio_keys,
135 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), 135 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys),
136}; 136};
137 137
138static struct platform_device visstrim_gpio_keys_device = {
139 .name = "gpio-keys",
140 .id = -1,
141 .dev = {
142 .platform_data = &visstrim_gpio_keys_platform_data,
143 },
144};
145
146/* Visstrim_SM10 has a microSD slot connected to sdhc1 */ 138/* Visstrim_SM10 has a microSD slot connected to sdhc1 */
147static int visstrim_m10_sdhc1_init(struct device *dev, 139static int visstrim_m10_sdhc1_init(struct device *dev,
148 irq_handler_t detect_irq, void *data) 140 irq_handler_t detect_irq, void *data)
@@ -186,7 +178,6 @@ static struct platform_device visstrim_m10_nor_mtd_device = {
186}; 178};
187 179
188static struct platform_device *platform_devices[] __initdata = { 180static struct platform_device *platform_devices[] __initdata = {
189 &visstrim_gpio_keys_device,
190 &visstrim_m10_nor_mtd_device, 181 &visstrim_m10_nor_mtd_device,
191}; 182};
192 183
@@ -255,6 +246,7 @@ static void __init visstrim_m10_board_init(void)
255 imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); 246 imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata);
256 imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); 247 imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata);
257 imx27_add_fec(NULL); 248 imx27_add_fec(NULL);
249 imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
258 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 250 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
259} 251}
260 252
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 340809a7d233..b0831efadefc 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -68,6 +68,7 @@ config MACH_PCM037
68config MACH_PCM037_EET 68config MACH_PCM037_EET
69 bool "Support pcm037 EET board extensions" 69 bool "Support pcm037 EET board extensions"
70 depends on MACH_PCM037 70 depends on MACH_PCM037
71 select IMX_HAVE_PLATFORM_GPIO_KEYS
71 select IMX_HAVE_PLATFORM_SPI_IMX 72 select IMX_HAVE_PLATFORM_SPI_IMX
72 help 73 help
73 Add support for PCM037 EET baseboard extensions. If you are using the 74 Add support for PCM037 EET baseboard extensions. If you are using the
@@ -168,6 +169,7 @@ config MACH_PCM043
168config MACH_ARMADILLO5X0 169config MACH_ARMADILLO5X0
169 bool "Support Atmark Armadillo-500 Development Base Board" 170 bool "Support Atmark Armadillo-500 Development Base Board"
170 select SOC_IMX31 171 select SOC_IMX31
172 select IMX_HAVE_PLATFORM_GPIO_KEYS
171 select IMX_HAVE_PLATFORM_IMX_I2C 173 select IMX_HAVE_PLATFORM_IMX_I2C
172 select IMX_HAVE_PLATFORM_IMX_UART 174 select IMX_HAVE_PLATFORM_IMX_UART
173 select IMX_HAVE_PLATFORM_MXC_EHCI 175 select IMX_HAVE_PLATFORM_MXC_EHCI
@@ -233,6 +235,7 @@ choice
233 235
234config MACH_EUKREA_MBIMXSD35_BASEBOARD 236config MACH_EUKREA_MBIMXSD35_BASEBOARD
235 bool "Eukrea MBIMXSD development board" 237 bool "Eukrea MBIMXSD development board"
238 select IMX_HAVE_PLATFORM_GPIO_KEYS
236 select IMX_HAVE_PLATFORM_IMX_SSI 239 select IMX_HAVE_PLATFORM_IMX_SSI
237 help 240 help
238 This adds board specific devices that can be found on Eukrea's 241 This adds board specific devices that can be found on Eukrea's
@@ -244,6 +247,7 @@ config MACH_VPR200
244 bool "Support VPR200 platform" 247 bool "Support VPR200 platform"
245 select SOC_IMX35 248 select SOC_IMX35
246 select IMX_HAVE_PLATFORM_FSL_USB2_UDC 249 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
250 select IMX_HAVE_PLATFORM_GPIO_KEYS
247 select IMX_HAVE_PLATFORM_IMX2_WDT 251 select IMX_HAVE_PLATFORM_IMX2_WDT
248 select IMX_HAVE_PLATFORM_IMX_UART 252 select IMX_HAVE_PLATFORM_IMX_UART
249 select IMX_HAVE_PLATFORM_IMX_I2C 253 select IMX_HAVE_PLATFORM_IMX_I2C
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
index 2e288b38b4ad..63981ca8fc31 100644
--- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
+++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
@@ -26,7 +26,6 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/leds.h> 27#include <linux/leds.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/gpio_keys.h>
30#include <linux/input.h> 29#include <linux/input.h>
31#include <video/platform_lcd.h> 30#include <video/platform_lcd.h>
32#include <linux/i2c.h> 31#include <linux/i2c.h>
@@ -223,23 +222,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
223 }, 222 },
224}; 223};
225 224
226static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { 225static const struct gpio_keys_platform_data
226 eukrea_mbimxsd_button_data __initconst = {
227 .buttons = eukrea_mbimxsd_gpio_buttons, 227 .buttons = eukrea_mbimxsd_gpio_buttons,
228 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), 228 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
229}; 229};
230 230
231static struct platform_device eukrea_mbimxsd_button_device = {
232 .name = "gpio-keys",
233 .id = -1,
234 .num_resources = 0,
235 .dev = {
236 .platform_data = &eukrea_mbimxsd_button_data,
237 }
238};
239
240static struct platform_device *platform_devices[] __initdata = { 231static struct platform_device *platform_devices[] __initdata = {
241 &eukrea_mbimxsd_leds_gpio, 232 &eukrea_mbimxsd_leds_gpio,
242 &eukrea_mbimxsd_button_device,
243 &eukrea_mbimxsd_lcd_powerdev, 233 &eukrea_mbimxsd_lcd_powerdev,
244}; 234};
245 235
@@ -315,4 +305,5 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
315 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 305 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
316 306
317 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 307 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
318} 309}
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index 226829bf7c25..ace0c4c3b662 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -34,7 +34,6 @@
34#include <linux/mtd/physmap.h> 34#include <linux/mtd/physmap.h>
35#include <linux/io.h> 35#include <linux/io.h>
36#include <linux/input.h> 36#include <linux/input.h>
37#include <linux/gpio_keys.h>
38#include <linux/i2c.h> 37#include <linux/i2c.h>
39#include <linux/usb/otg.h> 38#include <linux/usb/otg.h>
40#include <linux/usb/ulpi.h> 39#include <linux/usb/ulpi.h>
@@ -280,20 +279,12 @@ static struct gpio_keys_button armadillo5x0_buttons[] = {
280 } 279 }
281}; 280};
282 281
283static struct gpio_keys_platform_data armadillo5x0_button_data = { 282static const struct gpio_keys_platform_data
283 armadillo5x0_button_data __initconst = {
284 .buttons = armadillo5x0_buttons, 284 .buttons = armadillo5x0_buttons,
285 .nbuttons = ARRAY_SIZE(armadillo5x0_buttons), 285 .nbuttons = ARRAY_SIZE(armadillo5x0_buttons),
286}; 286};
287 287
288static struct platform_device armadillo5x0_button_device = {
289 .name = "gpio-keys",
290 .id = -1,
291 .num_resources = 0,
292 .dev = {
293 .platform_data = &armadillo5x0_button_data,
294 }
295};
296
297/* 288/*
298 * NAND Flash 289 * NAND Flash
299 */ 290 */
@@ -496,7 +487,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
496 487
497static struct platform_device *devices[] __initdata = { 488static struct platform_device *devices[] __initdata = {
498 &armadillo5x0_smc911x_device, 489 &armadillo5x0_smc911x_device,
499 &armadillo5x0_button_device,
500}; 490};
501 491
502/* 492/*
@@ -508,6 +498,7 @@ static void __init armadillo5x0_init(void)
508 ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); 498 ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");
509 499
510 platform_add_devices(devices, ARRAY_SIZE(devices)); 500 platform_add_devices(devices, ARRAY_SIZE(devices));
501 imx_add_gpio_keys(&armadillo5x0_button_data);
511 imx31_add_imx_i2c1(NULL); 502 imx31_add_imx_i2c1(NULL);
512 503
513 /* Register UART */ 504 /* Register UART */
diff --git a/arch/arm/mach-mx3/mach-pcm037_eet.c b/arch/arm/mach-mx3/mach-pcm037_eet.c
index df6fb07d037e..3f81e357affb 100644
--- a/arch/arm/mach-mx3/mach-pcm037_eet.c
+++ b/arch/arm/mach-mx3/mach-pcm037_eet.c
@@ -7,7 +7,6 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9#include <linux/gpio.h> 9#include <linux/gpio.h>
10#include <linux/gpio_keys.h>
11#include <linux/input.h> 10#include <linux/input.h>
12#include <linux/platform_device.h> 11#include <linux/platform_device.h>
13#include <linux/spi/spi.h> 12#include <linux/spi/spi.h>
@@ -156,20 +155,13 @@ static struct gpio_keys_button pcm037_gpio_keys[] = {
156 }, 155 },
157}; 156};
158 157
159static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = { 158static const struct gpio_keys_platform_data
159 pcm037_gpio_keys_platform_data __initconst = {
160 .buttons = pcm037_gpio_keys, 160 .buttons = pcm037_gpio_keys,
161 .nbuttons = ARRAY_SIZE(pcm037_gpio_keys), 161 .nbuttons = ARRAY_SIZE(pcm037_gpio_keys),
162 .rep = 0, /* No auto-repeat */ 162 .rep = 0, /* No auto-repeat */
163}; 163};
164 164
165static struct platform_device pcm037_gpio_keys_device = {
166 .name = "gpio-keys",
167 .id = -1,
168 .dev = {
169 .platform_data = &pcm037_gpio_keys_platform_data,
170 },
171};
172
173static int __init eet_init_devices(void) 165static int __init eet_init_devices(void)
174{ 166{
175 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) 167 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
@@ -182,9 +174,8 @@ static int __init eet_init_devices(void)
182 spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); 174 spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
183 imx31_add_spi_imx0(&pcm037_spi1_pdata); 175 imx31_add_spi_imx0(&pcm037_spi1_pdata);
184 176
185 platform_device_register(&pcm037_gpio_keys_device); 177 imx_add_gpio_keys(&pcm037_gpio_keys_platform_data);
186 178
187 return 0; 179 return 0;
188} 180}
189
190late_initcall(eet_init_devices); 181late_initcall(eet_init_devices);
diff --git a/arch/arm/mach-mx3/mach-vpr200.c b/arch/arm/mach-mx3/mach-vpr200.c
index 47a69cbc31a8..d7d190eacdcd 100644
--- a/arch/arm/mach-mx3/mach-vpr200.c
+++ b/arch/arm/mach-mx3/mach-vpr200.c
@@ -141,18 +141,12 @@ static struct gpio_keys_button vpr200_gpio_keys_table[] = {
141 {KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE}, 141 {KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE},
142}; 142};
143 143
144static struct gpio_keys_platform_data vpr200_gpio_keys_data = { 144static const struct gpio_keys_platform_data
145 vpr200_gpio_keys_data __initconst = {
145 .buttons = vpr200_gpio_keys_table, 146 .buttons = vpr200_gpio_keys_table,
146 .nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table), 147 .nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table),
147}; 148};
148 149
149static struct platform_device vpr200_device_gpiokeys = {
150 .name = "gpio-keys",
151 .dev = {
152 .platform_data = &vpr200_gpio_keys_data,
153 }
154};
155
156static struct mc13xxx_platform_data vpr200_pmic = { 150static struct mc13xxx_platform_data vpr200_pmic = {
157 .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, 151 .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN,
158}; 152};
@@ -271,7 +265,6 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
271 265
272static struct platform_device *devices[] __initdata = { 266static struct platform_device *devices[] __initdata = {
273 &vpr200_flash, 267 &vpr200_flash,
274 &vpr200_device_gpiokeys,
275}; 268};
276 269
277/* 270/*
@@ -283,6 +276,7 @@ static void __init vpr200_board_init(void)
283 276
284 imx35_add_fec(NULL); 277 imx35_add_fec(NULL);
285 imx35_add_imx2_wdt(NULL); 278 imx35_add_imx2_wdt(NULL);
279 imx_add_gpio_keys(&vpr200_gpio_keys_data);
286 280
287 platform_add_devices(devices, ARRAY_SIZE(devices)); 281 platform_add_devices(devices, ARRAY_SIZE(devices));
288 282
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
index e6c1119c20ae..0c80b62ed786 100644
--- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
+++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
@@ -27,7 +27,6 @@
27#include <linux/irq.h> 27#include <linux/irq.h>
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/gpio_keys.h>
31#include <linux/input.h> 30#include <linux/input.h>
32#include <linux/i2c.h> 31#include <linux/i2c.h>
33 32
@@ -108,23 +107,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
108 }, 107 },
109}; 108};
110 109
111static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { 110static const struct gpio_keys_platform_data
111 eukrea_mbimxsd_button_data __initconst = {
112 .buttons = eukrea_mbimxsd_gpio_buttons, 112 .buttons = eukrea_mbimxsd_gpio_buttons,
113 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), 113 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
114}; 114};
115 115
116static struct platform_device eukrea_mbimxsd_button_device = {
117 .name = "gpio-keys",
118 .id = -1,
119 .num_resources = 0,
120 .dev = {
121 .platform_data = &eukrea_mbimxsd_button_data,
122 }
123};
124
125static struct platform_device *platform_devices[] __initdata = { 116static struct platform_device *platform_devices[] __initdata = {
126 &eukrea_mbimxsd_leds_gpio, 117 &eukrea_mbimxsd_leds_gpio,
127 &eukrea_mbimxsd_button_device,
128}; 118};
129 119
130static const struct imxuart_platform_data uart_pdata __initconst = { 120static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -166,4 +156,5 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
166 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 156 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
167 157
168 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 158 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
159 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
169} 160}