public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	ARM Linux Mailing List  <linux-arm-kernel@lists.arm.linux.org.uk>,
	Andrew Victor <linux@maxim.org.za>
Subject: Re: [PATCH] AT91: correct at91sam9263ek LCD power gpio pin
Date: Thu, 17 Jan 2008 01:34:16 -0800	[thread overview]
Message-ID: <200801170134.16516.david-b@pacbell.net> (raw)
In-Reply-To: <478F1AFC.40404@atmel.com>

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



  reply	other threads:[~2008-01-17  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17  9:08 [PATCH] AT91: correct at91sam9263ek LCD power gpio pin Nicolas Ferre
2008-01-17  9:34 ` David Brownell [this message]
2008-01-17 13:03   ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801170134.16516.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@maxim.org.za \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox