]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Use GPIO LEDs at apollon
authorKyungmin Park <kyungmin.park@samsung.com>
Thu, 28 Feb 2008 23:08:43 +0000 (08:08 +0900)
committerTony Lindgren <tony@atomide.com>
Wed, 5 Mar 2008 11:13:51 +0000 (13:13 +0200)
Use generic GPIO LEDs instead of OMAP LEDs

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-apollon.c

index 6c2bfdb6ec4dd956652caf49b6ac7c267a5b83b3..ae0766586e84139daae4784fb32c9173dffca40b 100644 (file)
@@ -213,48 +213,39 @@ static struct platform_device apollon_lcd_device = {
        .id             = -1,
 };
 
-static struct omap_led_config apollon_led_config[] = {
+static struct gpio_led apollon_led_config[] = {
        {
-               .cdev   = {
-                       .name   = "apollon:led0",
-               },
-               .gpio   = LED0_GPIO13,
+               .name                   = "d2",
+               .gpio                   = LED0_GPIO13,
+               .default_trigger        = "heartbeat",
        },
        {
-               .cdev   = {
-                       .name   = "apollon:led1",
-               },
-               .gpio   = LED1_GPIO14,
+               .name                   = "d3",
+               .gpio                   = LED1_GPIO14,
        },
        {
-               .cdev   = {
-                       .name   = "apollon:led2",
-               },
-               .gpio   = LED2_GPIO15,
+               .name                   = "d4",
+               .gpio                   = LED2_GPIO15,
        },
 #ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
        {
-               .cdev   = {
-                       .name   = "apollon:led3",
-               },
-               .gpio   = LED3_GPIO92,
+               .name                   = "d5",
+               .gpio                   = LED3_GPIO92,
        },
        {
-               .cdev   = {
-                       .name   = "apollon:led4",
-               },
-               .gpio   = LED4_GPIO93,
+               .name                   = "d6",
+               .gpio                   = LED4_GPIO93,
        },
 #endif
 };
 
-static struct omap_led_platform_data apollon_led_data = {
-       .nr_leds        = ARRAY_SIZE(apollon_led_config),
+static struct gpio_led_platform_data apollon_led_data = {
+       .num_leds       = ARRAY_SIZE(apollon_led_config),
        .leds           = apollon_led_config,
 };
 
 static struct platform_device apollon_led_device = {
-       .name           = "omap-led",
+       .name           = "leds-gpio",
        .id             = -1,
        .dev            = {
                .platform_data  = &apollon_led_data,
@@ -389,30 +380,15 @@ static void __init apollon_led_init(void)
 {
        /* LED0 - AA10 */
        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 */
        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 */
        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
        /* LED3 - M15 */
        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 */
        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
 }