[Top] [All Lists]

Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h

To: Russell King - ARM Linux <>
Subject: Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h
From: Mark Brown <>
Date: Mon, 6 Feb 2012 11:37:20 +0000
Cc: Sam Ravnborg <>, Guan Xuetao <>, Ralf Baechle <>, Paul Mundt <>, Geert Uytterhoeven <>, Mike Frysinger <>, Haavard Skinnemoen <>, Hans-Christian Egtvedt <>, Grant Likely <>,,,,,,
In-reply-to: <>
References: <> <> <>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Feb 04, 2012 at 05:41:15PM +0000, Russell King - ARM Linux wrote:

> What's platform specific about asm/gpio.h is the number of GPIOs in
> the system, and whether it wants to intercept the gpio_xxx() functions
> to provide fast access to on-chip GPIOs.

Plus the fact that it might be a completely non-standard API, and might
totally override the gpiolib implementation.

> What I'd suggest is moving asm-generic/gpio.h to linux/gpiolib.h, and
> making asm-generic/gpio.h include that as a patch until stuff is fixed
> for its new location.  That should result in a proper asm-generic/gpio.h
> being:

> Alternatively, instead of linux/gpiolib.h, put it in linux/gpio.h instead,
> but that gets more icky because of the mess of asm/gpio.h includes (which
> I've been banging on for years about in ARM patches and they're _still_
> coming.)

Yeah, though it is a bit neater if it's all in gpio.h and everyone is
using gpiolib.  Perhaps something like the warnings I added on inclusion
of asm/gpio.h without linux/gpio.h would help, though I certainly
wouldn't expect it to solve anything.

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>