Skip to content

Commit

Permalink
omap3: igepv2: LED gpio-led:green:d1 is active low
Browse files Browse the repository at this point in the history
Make sure the LED is turned off at boot time, and configure the GPIO LED
device as active low.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Laurent Pinchart authored and Tony Lindgren committed Dec 21, 2010
1 parent 62d8e9e commit 70e7776
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ static struct gpio_led igep2_gpio_leds[] = {
.name = "gpio-led:green:d1",
.default_trigger = "heartbeat",
.gpio = -EINVAL, /* gets replaced */
.active_low = 1,
},
};

Expand Down Expand Up @@ -423,7 +424,7 @@ static int igep2_twl_gpio_setup(struct device *dev,
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0)
&& (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 0) == 0))
&& (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0))
gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
else
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n");
Expand Down

0 comments on commit 70e7776

Please sign in to comment.