Skip to contentSkip to conversation

AT91: correct at91sam9263ek LCD power gpio pin

PATCH In review Nicolas Ferre 2 participants 3 messages Jan 17, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AT91: correct at91sam9263ek LCD power gpio pin

Corrects GPIO pin assignment for the LCD power control (PCI)

---
arch/arm/mach-at91/board-sam9263ek.c | 4 ++--

arch/arm/mach-at91/board-sam9263ek.c +0 -0
@@ -243,9 +243,9 @@ static struct fb_monspecs at91fb_default

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 */
}

/* Driver datas */

#1 lore raw
Quoted 9 lines · Nicolas Ferre

 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

#2 lore raw

Corrects GPIO pin assignment for the LCD power control (PCI)

---
Simpler one.

arch/arm/mach-at91/board-sam9263ek.c | 5 +----

1 file changed, 1 insertion(+), 4 deletions(-)
arch/arm/mach-at91/board-sam9263ek.c +0 -0
@@ -242,10 +242,7 @@ static struct fb_monspecs at91fb_default
 

static void at91_lcdc_power_control(int on)
{
- if (on)
- at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
- else
- at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
+ at91_set_gpio_value(AT91_PIN_PA30, on);
}

/* Driver datas */