Re: [PATCH] AT91: correct at91sam9263ek LCD power gpio pin

From: David Brownell
Date: Thu Jan 17 2008 - 04:34:28 EST


On Thursday 17 January 2008, Nicolas Ferre wrote:
>  static void at91_lcdc_power_control(int on)
>  {
>         if (on)
> -               at91_set_gpio_value(AT91_PIN_PD12, 0);  /* power up */
> +               at91_set_gpio_value(AT91_PIN_PA30, 1);  /* power up */
>         else
> -               at91_set_gpio_value(AT91_PIN_PD12, 1);  /* power down */
> +               at91_set_gpio_value(AT91_PIN_PA30, 0);  /* power down */
>  }

It would really be a lot simpler as just:

gpio_set_value(AT91_PIN_PA30, on);

This isn't a case where SOC-specific mechanisms need to kick in
(like enabling open drain output drive mode, or input debounce);
and even the SOC-specific calls handle that "if" themselves. :)

- Dave


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/