From mboxrd@z Thu Jan 1 00:00:00 1970 From: philippe.langlais@stericsson.com (Philippe Langlais) Date: Fri, 16 Jul 2010 15:09:55 +0200 Subject: [PATCH 3/6] U6715 gpio platform driver This driver is U6XXX platform generic In-Reply-To: <20100715111823.GB29322@n2100.arm.linux.org.uk> References: <1278688913-26417-1-git-send-email-philippe.langlais@stericsson.com> <1278688913-26417-4-git-send-email-philippe.langlais@stericsson.com> <20100715111823.GB29322@n2100.arm.linux.org.uk> Message-ID: <4C405A23.7000009@stericsson.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, I take into account all comments and I'll send a new U6 GPIO patch Regards, Philippe On 07/15/10 13:18, Russell King - ARM Linux wrote: > Thanks, this is much better. Just a few remaining niggles. > > On Fri, Jul 09, 2010 at 05:21:50PM +0200, Philippe Langlais wrote: > >> diff --git a/arch/arm/mach-u67xx/board_u67xx_wavex.c b/arch/arm/mach-u67xx/board_u67xx_wavex.c >> index 633989f..235e80d 100644 >> --- a/arch/arm/mach-u67xx/board_u67xx_wavex.c >> +++ b/arch/arm/mach-u67xx/board_u67xx_wavex.c >> @@ -23,6 +23,473 @@ >> #include >> #include >> #include >> +#include >> > Should be linux/gpio.h > > >> diff --git a/arch/arm/mach-u67xx/devices.c b/arch/arm/mach-u67xx/devices.c >> index 1d00b35..e88a106 100644 >> --- a/arch/arm/mach-u67xx/devices.c >> +++ b/arch/arm/mach-u67xx/devices.c >> @@ -11,10 +11,78 @@ >> #include >> #include >> #include >> +#include >> #include >> +#include >> +#include >> +#include >> +#include >> +#include >> > You're already including linux/gpio.h, so this shouldn't be required. > > >> diff --git a/arch/arm/plat-u6xxx/gpio.c b/arch/arm/plat-u6xxx/gpio.c >> new file mode 100644 >> index 0000000..40205d2 >> --- /dev/null >> +++ b/arch/arm/plat-u6xxx/gpio.c >> @@ -0,0 +1,672 @@ >> +/* >> + * linux/arch/arm/plat-u6xxx/gpio.c >> + * >> + * Copyright (C) ST-Ericsson SA 2010 >> + * Author: Loic Pallardy for ST-Ericsson. >> + * License terms: GNU General Public License (GPL), version 2 >> + * Support functions for GPIO >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> > linux/gpio.h again please. > > >> +static struct platform_driver u6_gpio_driver = { >> + .probe = u6_gpio_probe, >> + .remove = NULL, >> + .suspend = NULL, >> + .resume = NULL, >> > NULL initializers aren't required. > > >> + .driver = { >> + .name = "u6-gpio", >> + }, >> > } should be aligned with the '.' of '.driver'. > > Lastly, I'm confused by this in a few places: > > local_irq_save(flags); > writel(some value, register); > local_irq_restore(flags); > > Is there a reason why this apparantly simple register write need IRQs to > be disabled? > > I don't think this patch needs another review cycle, unless someone else > wants to comment on it. >