提交 70e77760 编写于 作者: L Laurent Pinchart 提交者: Tony Lindgren

omap3: igepv2: LED gpio-led:green:d1 is active low

Make sure the LED is turned off at boot time, and configure the GPIO LED
device as active low.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 62d8e9e2
......@@ -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,
},
};
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册