aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c31
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 8102e7f361f3..a3125ac21425 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -323,6 +323,7 @@ config MACH_IMX27_VISSTRIM_M10
323 select IMX_HAVE_PLATFORM_MX2_CAMERA 323 select IMX_HAVE_PLATFORM_MX2_CAMERA
324 select IMX_HAVE_PLATFORM_MXC_EHCI 324 select IMX_HAVE_PLATFORM_MXC_EHCI
325 select IMX_HAVE_PLATFORM_MXC_MMC 325 select IMX_HAVE_PLATFORM_MXC_MMC
326 select LEDS_GPIO_REGISTER
326 help 327 help
327 Include support for Visstrim_m10 platform and its different variants. 328 Include support for Visstrim_m10 platform and its different variants.
328 This includes specific configurations for the board and its 329 This includes specific configurations for the board and its
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 7208a9efad70..0a1643c3f17d 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -31,6 +31,7 @@
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/dma-mapping.h> 33#include <linux/dma-mapping.h>
34#include <linux/leds.h>
34#include <linux/memblock.h> 35#include <linux/memblock.h>
35#include <media/soc_camera.h> 36#include <media/soc_camera.h>
36#include <sound/tlv320aic32x4.h> 37#include <sound/tlv320aic32x4.h>
@@ -232,6 +233,35 @@ static const struct gpio_keys_platform_data
232 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), 233 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys),
233}; 234};
234 235
236/* led */
237static const struct gpio_led visstrim_m10_leds[] __initconst = {
238 {
239 .name = "visstrim:ld0",
240 .default_trigger = "nand-disk",
241 .gpio = (GPIO_PORTC + 29),
242 },
243 {
244 .name = "visstrim:ld1",
245 .default_trigger = "nand-disk",
246 .gpio = (GPIO_PORTC + 24),
247 },
248 {
249 .name = "visstrim:ld2",
250 .default_trigger = "nand-disk",
251 .gpio = (GPIO_PORTC + 28),
252 },
253 {
254 .name = "visstrim:ld3",
255 .default_trigger = "nand-disk",
256 .gpio = (GPIO_PORTC + 25),
257 },
258};
259
260static const struct gpio_led_platform_data visstrim_m10_led_data __initconst = {
261 .leds = visstrim_m10_leds,
262 .num_leds = ARRAY_SIZE(visstrim_m10_leds),
263};
264
235/* Visstrim_SM10 has a microSD slot connected to sdhc1 */ 265/* Visstrim_SM10 has a microSD slot connected to sdhc1 */
236static int visstrim_m10_sdhc1_init(struct device *dev, 266static int visstrim_m10_sdhc1_init(struct device *dev,
237 irq_handler_t detect_irq, void *data) 267 irq_handler_t detect_irq, void *data)
@@ -365,6 +395,7 @@ static void __init visstrim_m10_board_init(void)
365 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 395 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
366 platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, 396 platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
367 &iclink_tvp5150, sizeof(iclink_tvp5150)); 397 &iclink_tvp5150, sizeof(iclink_tvp5150));
398 gpio_led_register_device(0, &visstrim_m10_led_data);
368 visstrim_camera_init(); 399 visstrim_camera_init();
369} 400}
370 401