public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Baruch Siach <baruch@tkos.co.il>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	"Russell King - ARM Linux" <linux@arm.linux.org.uk>
Subject: Re: [PATCH v5] gpio: driver for PrimeCell PL061 GPIO controller
Date: Mon, 15 Jun 2009 16:29:11 -0700	[thread overview]
Message-ID: <200906151629.11350.david-b@pacbell.net> (raw)
In-Reply-To: <1244708976-22122-1-git-send-email-baruch@tkos.co.il>

On Thursday 11 June 2009, Baruch Siach wrote:
> +static unsigned int pl061_irq_startup(unsigned irq)
> +{
> +       if (gpio_request(irq_to_gpio(irq), "IRQ") == 0)
> +               pr_warning("%s: warning: GPIO%d has not been requested\n",
> +                               __func__, irq_to_gpio(irq));

No, that's the responsibility of whoever is setting this up.

Normally, platform setup code would request the GPIO since it's
being dedicated to some task on the board ... and then pass the
gpio_to_irq() value as a device resource, or maybe the GPIO itself
(if the driver had to deal with GPIOs per se).

Also, irq_to_gpio() can be problematic in some systems; avoid it.


> +
> +       pl061_irq_enable(irq);
> +
> +       return 0;
> +}

Remove that gpio_request(), and the irq_to_gpio(), and you get:

Acked-by: David Brownell <dbrownell@users.sourceforge.net>

The driver is a trifle unusual in having only eight bits per bank,
but that's just hardware.  Software looks clean, thanks.



  reply	other threads:[~2009-06-15 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  8:29 [PATCH v5] gpio: driver for PrimeCell PL061 GPIO controller Baruch Siach
2009-06-15 23:29 ` David Brownell [this message]
2009-06-16  4:20   ` Baruch Siach
2009-06-16  7:42     ` David Brownell

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=200906151629.11350.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@linux-foundation.org \
    --cc=baruch@tkos.co.il \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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