[PATCH 2/9] collie: prepare for gpiolib use
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Oct 7 07:25:52 EDT 2009
On Wed, Oct 07, 2009 at 03:08:05PM +0400, Dmitry Artamonow wrote:
> On 23:35 Mon 05 Oct , Thomas Kunze wrote:
> > prefix gpio definitions for direct register access with '_' so we
> > can use the other names for gpio_request & co
> Familiar problem - numeric vs bit-shifted gpio defines.
> I'm facing it here too while converting h300 to gpiolib,
> and I'm thinking about dropping bit-shifted defines completely
> and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.
What we did with PXA was to decide not to use definitions for the built-in
GPIOs - what's the point of:
#define GPIO0 0
#define GPIO1 1
#define GPIO2 2
It's a bit like:
#define NUMBER0 0
#define NUMBER1 1
Yes, there's a reason to if the number spaces are different, but for
the built-in GPIOs, they aren't.
More information about the linux-arm-kernel