Re: [PATCH 2/2] omap3: igepv2: LED gpio-led:green:d1 is active low

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/12/12 Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>:
> 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@xxxxxxxxxxxxxxxx>
> ---
> Âarch/arm/mach-omap2/board-igep0020.c | Â Â3 ++-
> Â1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
> index 20b88c1..41a4b25 100644
> --- a/arch/arm/mach-omap2/board-igep0020.c
> +++ b/arch/arm/mach-omap2/board-igep0020.c
> @@ -317,6 +317,7 @@ static struct gpio_led igep2_gpio_leds[] = {
>        Â.name          = "gpio-led:green:d1",
>        Â.default_trigger    Â= "heartbeat",
>        Â.gpio          = -EINVAL, /* gets replaced */
> +        .active_low       = 1,
> Â Â Â Â},
> Â};
>
> @@ -394,7 +395,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");
> --
> 1.7.2.2
>
>

Acked-by: Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux