Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755164AbZLILlu (ORCPT ); Wed, 9 Dec 2009 06:41:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753687AbZLILlt (ORCPT ); Wed, 9 Dec 2009 06:41:49 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55976 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbZLILls (ORCPT ); Wed, 9 Dec 2009 06:41:48 -0500 Date: Wed, 9 Dec 2009 12:41:43 +0100 From: Pavel Machek To: Russell King - ARM Linux Cc: Arve Hj?nnev?g , kernel list , linux-arm-kernel , Brian Swetland , Daniel Walker , Iliyan Malchev Subject: Re: GPIO support for HTC Dream Message-ID: <20091209114143.GD22752@elf.ucw.cz> References: <20091208102842.GH12264@elf.ucw.cz> <20091208224550.GA26915@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091208224550.GA26915@n2100.arm.linux.org.uk> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4359 Lines: 159 On Tue 2009-12-08 22:45:50, Russell King - ARM Linux wrote: > On Tue, Dec 08, 2009 at 11:28:43AM +0100, Pavel Machek wrote: > > Add GPIO support for HTC Dream. > > > > Signed-off-by: Pavel Machek > > > > diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig > > index f780086..774c50e 100644 > > --- a/arch/arm/mach-msm/Kconfig > > +++ b/arch/arm/mach-msm/Kconfig > > @@ -40,4 +40,8 @@ config MACH_TROUT > > help > > Support for the HTC Dream, T-Mobile G1, Android ADP1 devices. > > > > +config GENERIC_GPIO > > + bool > > + default y > > Please arrange for this to be handled just like every other ARM > platform via a 'select' statement - eg: > > config ARCH_AT91 > bool "Atmel AT91" > select GENERIC_GPIO > select ARCH_REQUIRE_GPIOLIB > select HAVE_CLK > > It is not nice to have multiple definitions of the same symbol scattered > throughout the Kconfig files. Ok, fixed. > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > linux/gpio.h is preferred over asm/gpio.h Ok. > > +++ b/arch/arm/mach-msm/board-dream.c > > @@ -18,11 +18,13 @@ > > #include > > +#include > > ditto. Ok. > > +++ b/arch/arm/mach-msm/generic_gpio.c > > @@ -0,0 +1,274 @@ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > ditto. Ok. Incremental patch looks like: diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1c4119c..db622a5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -565,6 +565,7 @@ config ARCH_MSM select CPU_V6 select GENERIC_TIME select GENERIC_CLOCKEVENTS + select GENERIC_GPIO help Support for Qualcomm MSM7K based systems. This runs on the ARM11 apps processor of the MSM7K and depends on a shared memory diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 774c50e..f780086 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -40,8 +40,4 @@ config MACH_TROUT help Support for the HTC Dream, T-Mobile G1, Android ADP1 devices. -config GENERIC_GPIO - bool - default y - endif diff --git a/arch/arm/mach-msm/board-dream-gpio.c b/arch/arm/mach-msm/board-dream-gpio.c index 7796254..d9201f9 100644 --- a/arch/arm/mach-msm/board-dream-gpio.c +++ b/arch/arm/mach-msm/board-dream-gpio.c @@ -19,15 +19,16 @@ #include #include #include +#include -#include #include #include "board-dream.h" #include "gpio_chip.h" +/* We want to be compatible with existing bootloaders */ #undef MODULE_PARAM_PREFIX -#define MODULE_PARAM_PREFIX "board_dream." +#define MODULE_PARAM_PREFIX "board_trout." static uint cpld_usb_h2w_sw; module_param_named(usb_h2w_sw, cpld_usb_h2w_sw, uint, 0); diff --git a/arch/arm/mach-msm/board-dream.c b/arch/arm/mach-msm/board-dream.c index 3e8e54a..edefacf 100644 --- a/arch/arm/mach-msm/board-dream.c +++ b/arch/arm/mach-msm/board-dream.c @@ -19,12 +19,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/arch/arm/mach-msm/generic_gpio.c b/arch/arm/mach-msm/generic_gpio.c index 8ee7bd5..5164c77 100644 --- a/arch/arm/mach-msm/generic_gpio.c +++ b/arch/arm/mach-msm/generic_gpio.c @@ -18,7 +18,8 @@ #include #include #include -#include +#include + #include "gpio_chip.h" #define GPIO_NUM_TO_CHIP_INDEX(gpio) ((gpio)>>5) -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/