diff options
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index b390c35f8bc1..2b58df0184c1 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/timex.h> | 22 | #include <linux/timex.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/leds.h> | ||
25 | #include <linux/termios.h> | 26 | #include <linux/termios.h> |
26 | #include <linux/amba/bus.h> | 27 | #include <linux/amba/bus.h> |
27 | #include <linux/amba/serial.h> | 28 | #include <linux/amba/serial.h> |
@@ -568,6 +569,34 @@ void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) | |||
568 | platform_device_register(&ep93xx_i2c_device); | 569 | platform_device_register(&ep93xx_i2c_device); |
569 | } | 570 | } |
570 | 571 | ||
572 | |||
573 | /************************************************************************* | ||
574 | * EP93xx LEDs | ||
575 | *************************************************************************/ | ||
576 | static struct gpio_led ep93xx_led_pins[] = { | ||
577 | { | ||
578 | .name = "platform:grled", | ||
579 | .gpio = EP93XX_GPIO_LINE_GRLED, | ||
580 | }, { | ||
581 | .name = "platform:rdled", | ||
582 | .gpio = EP93XX_GPIO_LINE_RDLED, | ||
583 | }, | ||
584 | }; | ||
585 | |||
586 | static struct gpio_led_platform_data ep93xx_led_data = { | ||
587 | .num_leds = ARRAY_SIZE(ep93xx_led_pins), | ||
588 | .leds = ep93xx_led_pins, | ||
589 | }; | ||
590 | |||
591 | static struct platform_device ep93xx_leds = { | ||
592 | .name = "leds-gpio", | ||
593 | .id = -1, | ||
594 | .dev = { | ||
595 | .platform_data = &ep93xx_led_data, | ||
596 | }, | ||
597 | }; | ||
598 | |||
599 | |||
571 | extern void ep93xx_gpio_init(void); | 600 | extern void ep93xx_gpio_init(void); |
572 | 601 | ||
573 | void __init ep93xx_init_devices(void) | 602 | void __init ep93xx_init_devices(void) |
@@ -583,4 +612,5 @@ void __init ep93xx_init_devices(void) | |||
583 | 612 | ||
584 | platform_device_register(&ep93xx_rtc_device); | 613 | platform_device_register(&ep93xx_rtc_device); |
585 | platform_device_register(&ep93xx_ohci_device); | 614 | platform_device_register(&ep93xx_ohci_device); |
615 | platform_device_register(&ep93xx_leds); | ||
586 | } | 616 | } |