Commit 5ca3ac6a authored by Kyungmin Park's avatar Kyungmin Park Committed by Tony Lindgren

ARM: OMAP: Use GPIO LEDs at apollon

Use generic GPIO LEDs instead of OMAP LEDs
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d4149e08
...@@ -213,48 +213,39 @@ static struct platform_device apollon_lcd_device = { ...@@ -213,48 +213,39 @@ static struct platform_device apollon_lcd_device = {
.id = -1, .id = -1,
}; };
static struct omap_led_config apollon_led_config[] = { static struct gpio_led apollon_led_config[] = {
{ {
.cdev = { .name = "d2",
.name = "apollon:led0", .gpio = LED0_GPIO13,
}, .default_trigger = "heartbeat",
.gpio = LED0_GPIO13,
}, },
{ {
.cdev = { .name = "d3",
.name = "apollon:led1", .gpio = LED1_GPIO14,
},
.gpio = LED1_GPIO14,
}, },
{ {
.cdev = { .name = "d4",
.name = "apollon:led2", .gpio = LED2_GPIO15,
},
.gpio = LED2_GPIO15,
}, },
#ifdef CONFIG_MACH_OMAP_APOLLON_PLUS #ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
{ {
.cdev = { .name = "d5",
.name = "apollon:led3", .gpio = LED3_GPIO92,
},
.gpio = LED3_GPIO92,
}, },
{ {
.cdev = { .name = "d6",
.name = "apollon:led4", .gpio = LED4_GPIO93,
},
.gpio = LED4_GPIO93,
}, },
#endif #endif
}; };
static struct omap_led_platform_data apollon_led_data = { static struct gpio_led_platform_data apollon_led_data = {
.nr_leds = ARRAY_SIZE(apollon_led_config), .num_leds = ARRAY_SIZE(apollon_led_config),
.leds = apollon_led_config, .leds = apollon_led_config,
}; };
static struct platform_device apollon_led_device = { static struct platform_device apollon_led_device = {
.name = "omap-led", .name = "leds-gpio",
.id = -1, .id = -1,
.dev = { .dev = {
.platform_data = &apollon_led_data, .platform_data = &apollon_led_data,
...@@ -389,30 +380,15 @@ static void __init apollon_led_init(void) ...@@ -389,30 +380,15 @@ static void __init apollon_led_init(void)
{ {
/* LED0 - AA10 */ /* LED0 - AA10 */
omap_cfg_reg(AA10_242X_GPIO13); omap_cfg_reg(AA10_242X_GPIO13);
omap_request_gpio(LED0_GPIO13);
omap_set_gpio_direction(LED0_GPIO13, 0);
omap_set_gpio_dataout(LED0_GPIO13, 0);
/* LED1 - AA6 */ /* LED1 - AA6 */
omap_cfg_reg(AA6_242X_GPIO14); omap_cfg_reg(AA6_242X_GPIO14);
omap_request_gpio(LED1_GPIO14);
omap_set_gpio_direction(LED1_GPIO14, 0);
omap_set_gpio_dataout(LED1_GPIO14, 0);
/* LED2 - AA4 */ /* LED2 - AA4 */
omap_cfg_reg(AA4_242X_GPIO15); omap_cfg_reg(AA4_242X_GPIO15);
omap_request_gpio(LED2_GPIO15);
omap_set_gpio_direction(LED2_GPIO15, 0);
omap_set_gpio_dataout(LED2_GPIO15, 0);
#ifdef CONFIG_MACH_OMAP_APOLLON_PLUS #ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
/* LED3 - M15 */ /* LED3 - M15 */
omap_cfg_reg(M15_24XX_GPIO92); omap_cfg_reg(M15_24XX_GPIO92);
omap_request_gpio(LED3_GPIO92);
omap_set_gpio_direction(LED3_GPIO92, 0);
omap_set_gpio_dataout(LED3_GPIO92, 0);
/* LED4 - P20 */ /* LED4 - P20 */
omap_cfg_reg(P20_24XX_GPIO93); omap_cfg_reg(P20_24XX_GPIO93);
omap_request_gpio(LED4_GPIO93);
omap_set_gpio_direction(LED4_GPIO93, 0);
omap_set_gpio_dataout(LED4_GPIO93, 0);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment