From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h Date: Sat, 4 Feb 2012 18:06:32 +0100 Message-ID: <20120204170632.GA3615@merkur.ravnborg.org> References: <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> Sender: linux-m68k-owner@vger.kernel.org To: Mark Brown Cc: Guan Xuetao , Russell King , Ralf Baechle , Paul Mundt , Geert Uytterhoeven , Mike Frysinger , Haavard Skinnemoen , Hans-Christian Egtvedt , Grant Likely , 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 List-Id: linux-arch.vger.kernel.org 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 . 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.snhosting.dk ([87.238.248.203]:18480 "EHLO smtp.domainteam.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714Ab2BDRGf (ORCPT ); Sat, 4 Feb 2012 12:06:35 -0500 Date: Sat, 4 Feb 2012 18:06:32 +0100 From: Sam Ravnborg Subject: Re: [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h Message-ID: <20120204170632.GA3615@merkur.ravnborg.org> References: <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1328370879-18523-1-git-send-email-broonie@opensource.wolfsonmicro.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Mark Brown Cc: Guan Xuetao , Russell King , Ralf Baechle , Paul Mundt , Geert Uytterhoeven , Mike Frysinger , Haavard Skinnemoen , Hans-Christian Egtvedt , Grant Likely , 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 Message-ID: <20120204170632.9aIs-AKPkwnRVN3AqBA_tD-qSTqE4trwYx_gDTbmHhI@z> 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 . 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