linux-mips
[Top] [All Lists]

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

To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date: Mon, 6 Feb 2012 11:37:20 +0000
Cc: Sam Ravnborg <sam@ravnborg.org>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Ralf Baechle <ralf@linux-mips.org>, Paul Mundt <lethal@linux-sh.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Mike Frysinger <vapier@gentoo.org>, Haavard Skinnemoen <hskinnemoen@gmail.com>, Hans-Christian Egtvedt <egtvedt@samfundet.no>, Grant Likely <grant.likely@secretlab.ca>, linux-arch@vger.kernel.org, linux-mips@linux-mips.org, uclinux-dist-devel@blackfin.uclinux.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org
In-reply-to: <20120204174115.GX889@n2100.arm.linux.org.uk>
References: <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> <20120204170632.GA3615@merkur.ravnborg.org> <20120204174115.GX889@n2100.arm.linux.org.uk>
Sender: linux-mips-bounce@linux-mips.org
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>