public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] AT91: correct at91sam9263ek LCD power gpio pin
@ 2008-01-17  9:08 Nicolas Ferre
  2008-01-17  9:34 ` David Brownell
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Ferre @ 2008-01-17  9:08 UTC (permalink / raw)
  To: Linux Kernel list, ARM Linux Mailing List; +Cc: Andrew Victor, David Brownell

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

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/board-sam9263ek.c     |    4 ++--

--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -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 */


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] AT91: correct at91sam9263ek LCD power gpio pin
  2008-01-17  9:08 [PATCH] AT91: correct at91sam9263ek LCD power gpio pin Nicolas Ferre
@ 2008-01-17  9:34 ` David Brownell
  2008-01-17 13:03   ` Nicolas Ferre
  0 siblings, 1 reply; 3+ messages in thread
From: David Brownell @ 2008-01-17  9:34 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: Linux Kernel list, ARM Linux Mailing List, Andrew Victor

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] AT91: correct at91sam9263ek LCD power gpio pin
  2008-01-17  9:34 ` David Brownell
@ 2008-01-17 13:03   ` Nicolas Ferre
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2008-01-17 13:03 UTC (permalink / raw)
  To: David Brownell, Linux Kernel list, ARM Linux Mailing List; +Cc: Andrew Victor

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

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Simpler one.

 arch/arm/mach-at91/board-sam9263ek.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- linux-2.6-snapshot.orig/arch/arm/mach-at91/board-sam9263ek.c
+++ linux-2.6-snapshot/arch/arm/mach-at91/board-sam9263ek.c
@@ -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 */


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-17 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17  9:08 [PATCH] AT91: correct at91sam9263ek LCD power gpio pin Nicolas Ferre
2008-01-17  9:34 ` David Brownell
2008-01-17 13:03   ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox