linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] GPIO: move OMAP driver to drivers/gpio
@ 2011-05-20 13:41 Kevin Hilman
  2011-05-20 13:41 ` [PATCH 1/2] GPIO: OMAP: move register offset defines into <plat/gpio.h> Kevin Hilman
       [not found] ` <1305898868-9188-3-git-send-email-khilman@ti.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-05-20 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

Move OMAP GPIO driver to drivers/gpio, but leave OMAP-specific
register definitions in <plat/gpio.h>, where they will be used by
SoC-specific code and passed in via platform_data (in forthcoming
series.)

After the move, I have another series that cleans up this
driver, removing all the SoC-specific checks, #ifdefs, etc. and passes
SoC-specific register offsets in from platform_data.

Kevin Hilman (2):
  GPIO: OMAP: move register offset defines into <plat/gpio.h>
  GPIO: OMAP: move to drivers/gpio

 arch/arm/plat-omap/Makefile            |    2 +-
 arch/arm/plat-omap/gpio.c              | 2128 --------------------------------
 arch/arm/plat-omap/include/plat/gpio.h |  103 ++
 drivers/gpio/Makefile                  |    1 +
 drivers/gpio/gpio_omap.c               | 2023 ++++++++++++++++++++++++++++++
 5 files changed, 2128 insertions(+), 2129 deletions(-)
 delete mode 100644 arch/arm/plat-omap/gpio.c
 create mode 100644 drivers/gpio/gpio_omap.c

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] GPIO: OMAP: move register offset defines into <plat/gpio.h>
  2011-05-20 13:41 [PATCH 0/2] GPIO: move OMAP driver to drivers/gpio Kevin Hilman
@ 2011-05-20 13:41 ` Kevin Hilman
       [not found] ` <1305898868-9188-3-git-send-email-khilman@ti.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-05-20 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

Register offset defines are moved to <plat/gpio.h> so they can be used
by SoC-specific device init code to fill out platform_data register
offsets.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/plat-omap/gpio.c              |  103 --------------------------------
 arch/arm/plat-omap/include/plat/gpio.h |  103 ++++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index d2adcdd..ff70538 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -30,109 +30,6 @@
 #include <mach/gpio.h>
 #include <asm/mach/irq.h>
 
-/*
- * OMAP1510 GPIO registers
- */
-#define OMAP1510_GPIO_DATA_INPUT	0x00
-#define OMAP1510_GPIO_DATA_OUTPUT	0x04
-#define OMAP1510_GPIO_DIR_CONTROL	0x08
-#define OMAP1510_GPIO_INT_CONTROL	0x0c
-#define OMAP1510_GPIO_INT_MASK		0x10
-#define OMAP1510_GPIO_INT_STATUS	0x14
-#define OMAP1510_GPIO_PIN_CONTROL	0x18
-
-#define OMAP1510_IH_GPIO_BASE		64
-
-/*
- * OMAP1610 specific GPIO registers
- */
-#define OMAP1610_GPIO_REVISION		0x0000
-#define OMAP1610_GPIO_SYSCONFIG		0x0010
-#define OMAP1610_GPIO_SYSSTATUS		0x0014
-#define OMAP1610_GPIO_IRQSTATUS1	0x0018
-#define OMAP1610_GPIO_IRQENABLE1	0x001c
-#define OMAP1610_GPIO_WAKEUPENABLE	0x0028
-#define OMAP1610_GPIO_DATAIN		0x002c
-#define OMAP1610_GPIO_DATAOUT		0x0030
-#define OMAP1610_GPIO_DIRECTION		0x0034
-#define OMAP1610_GPIO_EDGE_CTRL1	0x0038
-#define OMAP1610_GPIO_EDGE_CTRL2	0x003c
-#define OMAP1610_GPIO_CLEAR_IRQENABLE1	0x009c
-#define OMAP1610_GPIO_CLEAR_WAKEUPENA	0x00a8
-#define OMAP1610_GPIO_CLEAR_DATAOUT	0x00b0
-#define OMAP1610_GPIO_SET_IRQENABLE1	0x00dc
-#define OMAP1610_GPIO_SET_WAKEUPENA	0x00e8
-#define OMAP1610_GPIO_SET_DATAOUT	0x00f0
-
-/*
- * OMAP7XX specific GPIO registers
- */
-#define OMAP7XX_GPIO_DATA_INPUT		0x00
-#define OMAP7XX_GPIO_DATA_OUTPUT	0x04
-#define OMAP7XX_GPIO_DIR_CONTROL	0x08
-#define OMAP7XX_GPIO_INT_CONTROL	0x0c
-#define OMAP7XX_GPIO_INT_MASK		0x10
-#define OMAP7XX_GPIO_INT_STATUS		0x14
-
-/*
- * omap2+ specific GPIO registers
- */
-#define OMAP24XX_GPIO_REVISION		0x0000
-#define OMAP24XX_GPIO_IRQSTATUS1	0x0018
-#define OMAP24XX_GPIO_IRQSTATUS2	0x0028
-#define OMAP24XX_GPIO_IRQENABLE2	0x002c
-#define OMAP24XX_GPIO_IRQENABLE1	0x001c
-#define OMAP24XX_GPIO_WAKE_EN		0x0020
-#define OMAP24XX_GPIO_CTRL		0x0030
-#define OMAP24XX_GPIO_OE		0x0034
-#define OMAP24XX_GPIO_DATAIN		0x0038
-#define OMAP24XX_GPIO_DATAOUT		0x003c
-#define OMAP24XX_GPIO_LEVELDETECT0	0x0040
-#define OMAP24XX_GPIO_LEVELDETECT1	0x0044
-#define OMAP24XX_GPIO_RISINGDETECT	0x0048
-#define OMAP24XX_GPIO_FALLINGDETECT	0x004c
-#define OMAP24XX_GPIO_DEBOUNCE_EN	0x0050
-#define OMAP24XX_GPIO_DEBOUNCE_VAL	0x0054
-#define OMAP24XX_GPIO_CLEARIRQENABLE1	0x0060
-#define OMAP24XX_GPIO_SETIRQENABLE1	0x0064
-#define OMAP24XX_GPIO_CLEARWKUENA	0x0080
-#define OMAP24XX_GPIO_SETWKUENA		0x0084
-#define OMAP24XX_GPIO_CLEARDATAOUT	0x0090
-#define OMAP24XX_GPIO_SETDATAOUT	0x0094
-
-#define OMAP4_GPIO_REVISION		0x0000
-#define OMAP4_GPIO_EOI			0x0020
-#define OMAP4_GPIO_IRQSTATUSRAW0	0x0024
-#define OMAP4_GPIO_IRQSTATUSRAW1	0x0028
-#define OMAP4_GPIO_IRQSTATUS0		0x002c
-#define OMAP4_GPIO_IRQSTATUS1		0x0030
-#define OMAP4_GPIO_IRQSTATUSSET0	0x0034
-#define OMAP4_GPIO_IRQSTATUSSET1	0x0038
-#define OMAP4_GPIO_IRQSTATUSCLR0	0x003c
-#define OMAP4_GPIO_IRQSTATUSCLR1	0x0040
-#define OMAP4_GPIO_IRQWAKEN0		0x0044
-#define OMAP4_GPIO_IRQWAKEN1		0x0048
-#define OMAP4_GPIO_IRQENABLE1		0x011c
-#define OMAP4_GPIO_WAKE_EN		0x0120
-#define OMAP4_GPIO_IRQSTATUS2		0x0128
-#define OMAP4_GPIO_IRQENABLE2		0x012c
-#define OMAP4_GPIO_CTRL			0x0130
-#define OMAP4_GPIO_OE			0x0134
-#define OMAP4_GPIO_DATAIN		0x0138
-#define OMAP4_GPIO_DATAOUT		0x013c
-#define OMAP4_GPIO_LEVELDETECT0		0x0140
-#define OMAP4_GPIO_LEVELDETECT1		0x0144
-#define OMAP4_GPIO_RISINGDETECT		0x0148
-#define OMAP4_GPIO_FALLINGDETECT	0x014c
-#define OMAP4_GPIO_DEBOUNCENABLE	0x0150
-#define OMAP4_GPIO_DEBOUNCINGTIME	0x0154
-#define OMAP4_GPIO_CLEARIRQENABLE1	0x0160
-#define OMAP4_GPIO_SETIRQENABLE1	0x0164
-#define OMAP4_GPIO_CLEARWKUENA		0x0180
-#define OMAP4_GPIO_SETWKUENA		0x0184
-#define OMAP4_GPIO_CLEARDATAOUT		0x0190
-#define OMAP4_GPIO_SETDATAOUT		0x0194
-
 struct gpio_bank {
 	unsigned long pbase;
 	void __iomem *base;
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h
index cac2e8a..ec97e00 100644
--- a/arch/arm/plat-omap/include/plat/gpio.h
+++ b/arch/arm/plat-omap/include/plat/gpio.h
@@ -52,6 +52,109 @@
 
 #define OMAP34XX_NR_GPIOS		6
 
+/*
+ * OMAP1510 GPIO registers
+ */
+#define OMAP1510_GPIO_DATA_INPUT	0x00
+#define OMAP1510_GPIO_DATA_OUTPUT	0x04
+#define OMAP1510_GPIO_DIR_CONTROL	0x08
+#define OMAP1510_GPIO_INT_CONTROL	0x0c
+#define OMAP1510_GPIO_INT_MASK		0x10
+#define OMAP1510_GPIO_INT_STATUS	0x14
+#define OMAP1510_GPIO_PIN_CONTROL	0x18
+
+#define OMAP1510_IH_GPIO_BASE		64
+
+/*
+ * OMAP1610 specific GPIO registers
+ */
+#define OMAP1610_GPIO_REVISION		0x0000
+#define OMAP1610_GPIO_SYSCONFIG		0x0010
+#define OMAP1610_GPIO_SYSSTATUS		0x0014
+#define OMAP1610_GPIO_IRQSTATUS1	0x0018
+#define OMAP1610_GPIO_IRQENABLE1	0x001c
+#define OMAP1610_GPIO_WAKEUPENABLE	0x0028
+#define OMAP1610_GPIO_DATAIN		0x002c
+#define OMAP1610_GPIO_DATAOUT		0x0030
+#define OMAP1610_GPIO_DIRECTION		0x0034
+#define OMAP1610_GPIO_EDGE_CTRL1	0x0038
+#define OMAP1610_GPIO_EDGE_CTRL2	0x003c
+#define OMAP1610_GPIO_CLEAR_IRQENABLE1	0x009c
+#define OMAP1610_GPIO_CLEAR_WAKEUPENA	0x00a8
+#define OMAP1610_GPIO_CLEAR_DATAOUT	0x00b0
+#define OMAP1610_GPIO_SET_IRQENABLE1	0x00dc
+#define OMAP1610_GPIO_SET_WAKEUPENA	0x00e8
+#define OMAP1610_GPIO_SET_DATAOUT	0x00f0
+
+/*
+ * OMAP7XX specific GPIO registers
+ */
+#define OMAP7XX_GPIO_DATA_INPUT		0x00
+#define OMAP7XX_GPIO_DATA_OUTPUT	0x04
+#define OMAP7XX_GPIO_DIR_CONTROL	0x08
+#define OMAP7XX_GPIO_INT_CONTROL	0x0c
+#define OMAP7XX_GPIO_INT_MASK		0x10
+#define OMAP7XX_GPIO_INT_STATUS		0x14
+
+/*
+ * omap2+ specific GPIO registers
+ */
+#define OMAP24XX_GPIO_REVISION		0x0000
+#define OMAP24XX_GPIO_IRQSTATUS1	0x0018
+#define OMAP24XX_GPIO_IRQSTATUS2	0x0028
+#define OMAP24XX_GPIO_IRQENABLE2	0x002c
+#define OMAP24XX_GPIO_IRQENABLE1	0x001c
+#define OMAP24XX_GPIO_WAKE_EN		0x0020
+#define OMAP24XX_GPIO_CTRL		0x0030
+#define OMAP24XX_GPIO_OE		0x0034
+#define OMAP24XX_GPIO_DATAIN		0x0038
+#define OMAP24XX_GPIO_DATAOUT		0x003c
+#define OMAP24XX_GPIO_LEVELDETECT0	0x0040
+#define OMAP24XX_GPIO_LEVELDETECT1	0x0044
+#define OMAP24XX_GPIO_RISINGDETECT	0x0048
+#define OMAP24XX_GPIO_FALLINGDETECT	0x004c
+#define OMAP24XX_GPIO_DEBOUNCE_EN	0x0050
+#define OMAP24XX_GPIO_DEBOUNCE_VAL	0x0054
+#define OMAP24XX_GPIO_CLEARIRQENABLE1	0x0060
+#define OMAP24XX_GPIO_SETIRQENABLE1	0x0064
+#define OMAP24XX_GPIO_CLEARWKUENA	0x0080
+#define OMAP24XX_GPIO_SETWKUENA		0x0084
+#define OMAP24XX_GPIO_CLEARDATAOUT	0x0090
+#define OMAP24XX_GPIO_SETDATAOUT	0x0094
+
+#define OMAP4_GPIO_REVISION		0x0000
+#define OMAP4_GPIO_EOI			0x0020
+#define OMAP4_GPIO_IRQSTATUSRAW0	0x0024
+#define OMAP4_GPIO_IRQSTATUSRAW1	0x0028
+#define OMAP4_GPIO_IRQSTATUS0		0x002c
+#define OMAP4_GPIO_IRQSTATUS1		0x0030
+#define OMAP4_GPIO_IRQSTATUSSET0	0x0034
+#define OMAP4_GPIO_IRQSTATUSSET1	0x0038
+#define OMAP4_GPIO_IRQSTATUSCLR0	0x003c
+#define OMAP4_GPIO_IRQSTATUSCLR1	0x0040
+#define OMAP4_GPIO_IRQWAKEN0		0x0044
+#define OMAP4_GPIO_IRQWAKEN1		0x0048
+#define OMAP4_GPIO_IRQENABLE1		0x011c
+#define OMAP4_GPIO_WAKE_EN		0x0120
+#define OMAP4_GPIO_IRQSTATUS2		0x0128
+#define OMAP4_GPIO_IRQENABLE2		0x012c
+#define OMAP4_GPIO_CTRL			0x0130
+#define OMAP4_GPIO_OE			0x0134
+#define OMAP4_GPIO_DATAIN		0x0138
+#define OMAP4_GPIO_DATAOUT		0x013c
+#define OMAP4_GPIO_LEVELDETECT0		0x0140
+#define OMAP4_GPIO_LEVELDETECT1		0x0144
+#define OMAP4_GPIO_RISINGDETECT		0x0148
+#define OMAP4_GPIO_FALLINGDETECT	0x014c
+#define OMAP4_GPIO_DEBOUNCENABLE	0x0150
+#define OMAP4_GPIO_DEBOUNCINGTIME	0x0154
+#define OMAP4_GPIO_CLEARIRQENABLE1	0x0160
+#define OMAP4_GPIO_SETIRQENABLE1	0x0164
+#define OMAP4_GPIO_CLEARWKUENA		0x0180
+#define OMAP4_GPIO_SETWKUENA		0x0184
+#define OMAP4_GPIO_CLEARDATAOUT		0x0190
+#define OMAP4_GPIO_SETDATAOUT		0x0194
+
 #define OMAP_MPUIO(nr)		(OMAP_MAX_GPIO_LINES + (nr))
 #define OMAP_GPIO_IS_MPUIO(nr)	((nr) >= OMAP_MAX_GPIO_LINES)
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] GPIO: OMAP: move to drivers/gpio
       [not found]   ` <20110527073529.GF31953@ponder.secretlab.ca>
@ 2011-05-27  8:25     ` Grant Likely
  2011-05-27 15:46       ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Grant Likely @ 2011-05-27  8:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 27, 2011 at 1:35 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Fri, May 20, 2011 at 03:41:08PM +0200, Kevin Hilman wrote:
>> Move OMAP GPIO driver to drivers/gpio. ?Builds whenever
>> CONFIG_ARCH_OMAP=y.
>>
>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>
> Patch unfortunately doesn't apply cleanly to Linus' tree. ?There's
> been some changes to gpio.c compared to the tree this patch was
> prepared against.
>
> Also, if you use the -M flag when preparing the patch, then I'll be
> able to see what the changes are during the move, and fix things up
> intelligently if anything breaks.
>
> Can you respin and repost the series quickly?

While you're at it, can you name the moved file
drivers/gpio/gpio-omap.c?  ('-' instead of '_'.  Why, yes, I am a
nitpicker.)

g.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] GPIO: OMAP: move to drivers/gpio
  2011-05-27  8:25     ` [PATCH 2/2] GPIO: OMAP: move to drivers/gpio Grant Likely
@ 2011-05-27 15:46       ` Kevin Hilman
  2011-05-27 16:04         ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2011-05-27 15:46 UTC (permalink / raw)
  To: linux-arm-kernel

Grant Likely <grant.likely@secretlab.ca> writes:

> On Fri, May 27, 2011 at 1:35 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
>> On Fri, May 20, 2011 at 03:41:08PM +0200, Kevin Hilman wrote:
>>> Move OMAP GPIO driver to drivers/gpio. ?Builds whenever
>>> CONFIG_ARCH_OMAP=y.
>>>
>>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>>
>> Patch unfortunately doesn't apply cleanly to Linus' tree. ?There's
>> been some changes to gpio.c compared to the tree this patch was
>> prepared against.
>>
>> Also, if you use the -M flag when preparing the patch, then I'll be
>> able to see what the changes are during the move, and fix things up
>> intelligently if anything breaks.
>>
>> Can you respin and repost the series quickly?
>
> While you're at it, can you name the moved file
> drivers/gpio/gpio-omap.c?  ('-' instead of '_'.  Why, yes, I am a
> nitpicker.)

OK, I rebased onto RMK's for-linus branch (already pulled by Linus),
which contained some other changes touching gpio.c.    I also s/_/-/ in
the filename.

Below is pull request.

Thanks,

Kevin


The following changes since commit 9a55d9752d8abfc62f1ab05ccc790d22a0c8e7c0:

  Merge branch 'devel-stable' into for-linus (2011-05-23 19:28:04 +0100)

are available in the git repository at:

  ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_2.6.40/gpio-move

Kevin Hilman (2):
      GPIO: OMAP: move register offset defines into <plat/gpio.h>
      GPIO: OMAP: move to drivers/gpio

 arch/arm/plat-omap/Makefile                        |    2 +-
 arch/arm/plat-omap/include/plat/gpio.h             |  103 +++++++++++++++++++
 drivers/gpio/Makefile                              |    1 +
 .../plat-omap/gpio.c => drivers/gpio/gpio-omap.c   |  105 --------------------
 4 files changed, 105 insertions(+), 106 deletions(-)
 rename arch/arm/plat-omap/gpio.c => drivers/gpio/gpio-omap.c (93%)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] GPIO: OMAP: move to drivers/gpio
  2011-05-27 15:46       ` Kevin Hilman
@ 2011-05-27 16:04         ` Kevin Hilman
  2011-05-27 20:28           ` Grant Likely
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2011-05-27 16:04 UTC (permalink / raw)
  To: linux-arm-kernel

Kevin Hilman <khilman@ti.com> writes:

[...]

>
> OK, I rebased onto RMK's for-linus branch (already pulled by Linus),
> which contained some other changes touching gpio.c.    I also s/_/-/ in
> the filename.
>
> Below is pull request.

BTW, apologies for the ssh URL.  I used it because I just pushed it, and
wanted to be sure you didn't have to wait for the mirrors.

Kevin

> The following changes since commit 9a55d9752d8abfc62f1ab05ccc790d22a0c8e7c0:
>
>   Merge branch 'devel-stable' into for-linus (2011-05-23 19:28:04 +0100)
>
> are available in the git repository at:
>
>   ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_2.6.40/gpio-move
>
> Kevin Hilman (2):
>       GPIO: OMAP: move register offset defines into <plat/gpio.h>
>       GPIO: OMAP: move to drivers/gpio
>
>  arch/arm/plat-omap/Makefile                        |    2 +-
>  arch/arm/plat-omap/include/plat/gpio.h             |  103 +++++++++++++++++++
>  drivers/gpio/Makefile                              |    1 +
>  .../plat-omap/gpio.c => drivers/gpio/gpio-omap.c   |  105 --------------------
>  4 files changed, 105 insertions(+), 106 deletions(-)
>  rename arch/arm/plat-omap/gpio.c => drivers/gpio/gpio-omap.c (93%)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] GPIO: OMAP: move to drivers/gpio
  2011-05-27 16:04         ` Kevin Hilman
@ 2011-05-27 20:28           ` Grant Likely
  0 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2011-05-27 20:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 27, 2011 at 09:04:37AM -0700, Kevin Hilman wrote:
> Kevin Hilman <khilman@ti.com> writes:
> 
> [...]
> 
> >
> > OK, I rebased onto RMK's for-linus branch (already pulled by Linus),
> > which contained some other changes touching gpio.c.    I also s/_/-/ in
> > the filename.
> >
> > Below is pull request.
> 
> BTW, apologies for the ssh URL.  I used it because I just pushed it, and
> wanted to be sure you didn't have to wait for the mirrors.
> 
> Kevin

Merged, thanks.

g.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-27 20:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-20 13:41 [PATCH 0/2] GPIO: move OMAP driver to drivers/gpio Kevin Hilman
2011-05-20 13:41 ` [PATCH 1/2] GPIO: OMAP: move register offset defines into <plat/gpio.h> Kevin Hilman
     [not found] ` <1305898868-9188-3-git-send-email-khilman@ti.com>
     [not found]   ` <20110527073529.GF31953@ponder.secretlab.ca>
2011-05-27  8:25     ` [PATCH 2/2] GPIO: OMAP: move to drivers/gpio Grant Likely
2011-05-27 15:46       ` Kevin Hilman
2011-05-27 16:04         ` Kevin Hilman
2011-05-27 20:28           ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).