[PATCH] pio: add arch specific gpio_is_valid() function

David Brownell david-b at pacbell.net
Tue Sep 7 14:10:14 EDT 2010



--- On Mon, 9/6/10, Ryan Mallon <ryan at bluewatersys.com> wrote:

> >  The intent of my patch was to keep gpio_is_valid
> simple, but add
> a simple check for architectures where the base gpio is not
> zero. Will
> wait and see what David has to say.

NAK still.  You're trying to abuse gpio_is_valid(),
which I see no need to support.


In terms of GPIO framework architecture, zero is
the first GPIO in all cases, and is always
a valid GPIO number, even if it's not
requestable/swritable/readable on a given board.

Whether it's usable on a given platform depends
on whether a GPIO controller is registered which
claims numbers 0..N ... (assuming gpiolib in use).





More information about the linux-arm-kernel mailing list