From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: "Steven A. Falco" <sfalco@harris.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: PPC440EPx gpio driver
Date: Thu, 9 Oct 2008 21:38:10 +0400 [thread overview]
Message-ID: <20081009173810.GA14959@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <48EE3ABE.6090007@harris.com>
On Thu, Oct 09, 2008 at 01:09:18PM -0400, Steven A. Falco wrote:
> Please disregard the previous version, and consider this one instead.
> The only difference is making better use of to_ppc4xx_gpiochip(), which
> helps readability.
>
> Signed-off-by: Steve Falco <sfalco at harris.com>
[...]
> #endif /* __ASM_POWERPC_PPC4xx_H__ */
> diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig
> index 72fb35b..f4a8edb 100644
> --- a/arch/powerpc/sysdev/Kconfig
> +++ b/arch/powerpc/sysdev/Kconfig
> @@ -6,3 +6,11 @@ config PPC4xx_PCI_EXPRESS
> bool
> depends on PCI && 4xx
> default n
> +
> +config PPC4xx_GPIO
> + bool "PPC4xx GPIO support"
> + depends on 4xx
> + select ARCH_REQUIRE_GPIOLIB
> + select GENERIC_GPIO
> + help
> + Enable gpiolib support for PPC4xx based boards
User-selectable options should go into the
arch/powerpc/platforms/Kconfig, otherwise you'll see the PPC4xx GPIO
support in the top-level menu in the menuconfig.
> diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
> index a90054b..35d5765 100644
> --- a/arch/powerpc/sysdev/Makefile
> +++ b/arch/powerpc/sysdev/Makefile
> @@ -35,6 +35,7 @@ obj-$(CONFIG_OF_RTC) += of_rtc.o
> ifeq ($(CONFIG_PCI),y)
> obj-$(CONFIG_4xx) += ppc4xx_pci.o
> endif
> +obj-$(CONFIG_PPC4xx_GPIO) += ppc4xx_gpio.o
Though the driver and Makefile entries are OK to live in the the
sysdev/.
>
> # Temporary hack until we have migrated to asm-powerpc
> ifeq ($(ARCH),powerpc)
> diff --git a/arch/powerpc/sysdev/ppc4xx_gpio.c b/arch/powerpc/sysdev/ppc4xx_gpio.c
> new file mode 100644
> index 0000000..93acd3f
> --- /dev/null
> +++ b/arch/powerpc/sysdev/ppc4xx_gpio.c
> @@ -0,0 +1,238 @@
> +/*
> + * PPC4xx gpio driver
> + *
> + * Copyright (c) 2008 Harris Corporation
> + * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
> + * Copyright (c) MontaVista Software, Inc. 2008.
> + *
> + * Author: Steve Falco <sfalco@harris.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2
> + * as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/spinlock.h>
> +#include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/gpio.h>
We explicitly include all the headers, even if they're already
included in some header files. Thus you might want to add
#include <linux/types.h>
Reviewed-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Thanks!
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2008-10-09 17:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 20:56 PPC440EPx gpio driver Steven A. Falco
2008-10-08 21:33 ` Steven A. Falco
2008-10-09 13:49 ` Anton Vorontsov
2008-10-09 14:23 ` Stefan Roese
2008-10-09 15:10 ` Steven A. Falco
2008-10-09 15:19 ` Stefan Roese
2008-10-09 16:08 ` Anton Vorontsov
2008-10-09 16:55 ` Steven A. Falco
2008-10-09 17:09 ` Steven A. Falco
2008-10-09 17:38 ` Anton Vorontsov [this message]
2008-10-09 18:04 ` Steven A. Falco
2008-10-09 18:46 ` Stefan Roese
2008-10-09 19:03 ` Anton Vorontsov
2008-10-09 22:08 ` Sean MacLennan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081009173810.GA14959@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfalco@harris.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.