| To: | Mark Brown <broonie@opensource.wolfsonmicro.com> |
|---|---|
| Subject: | Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h |
| From: | Sam Ravnborg <sam@ravnborg.org> |
| Date: | Sat, 4 Feb 2012 18:06:32 +0100 |
| Cc: | Guan Xuetao <gxt@mprc.pku.edu.cn>, Russell King <linux@arm.linux.org.uk>, 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: | <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> |
| References: | <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Sat, Feb 04, 2012 at 03:54:39PM +0000, Mark Brown wrote:
> Rather than requiring architectures that use gpiolib but don't have any
> need to define anything custom to copy an asm/gpio.h provide a Kconfig
> symbol which architectures must select in order to include gpio.h and
> for other architectures just provide the trivial implementation directly.
Hi Mark.
There is an even simpler solution.
For each arch that uses asm-generic/gpio.h add a line
to arch/$ARCH/include/asm/Kbuild like this:
generic-y += gpio.h
This will then make this arch pick up the asm-generic version when
you do #include <asm/gpio.h>.
And you avoid the kconfig games.
iFor the archs which require their own asm/gpio.h file - just
add it to the asm/ dir - and do not add the generic-y assignment.
Sam
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h, Mark Brown |
|---|---|
| Next by Date: | Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h, Mark Brown |
| Previous by Thread: | [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h, Mark Brown |
| Next by Thread: | Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h, Mark Brown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |