* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
@ 2011-09-20 8:42 Linus Walleij
2011-09-20 17:40 ` Grant Likely
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Linus Walleij @ 2011-09-20 8:42 UTC (permalink / raw)
To: linux-arm-kernel
From: Linus Walleij <linus.walleij@linaro.org>
The <mach/gpio.h> file is included from upper directories
and deal with generic GPIO and gpiolib stuff. Break out the
platform and driver specific defines and functions into its own
header file.
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Move the irq_to_gpio() into the driver since it was the only
thing actually using it, as a result the ep93xx gpio.h
is trivial and becomes empty.
- Putting this into the patch tracker as 7042/2 soon-ish.
---
arch/arm/mach-ep93xx/core.c | 1 +
arch/arm/mach-ep93xx/edb93xx.c | 1 +
arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | 100 +++++++++++++++++++++
arch/arm/mach-ep93xx/include/mach/gpio.h | 105 -----------------------
arch/arm/mach-ep93xx/simone.c | 2 +-
arch/arm/mach-ep93xx/snappercl15.c | 2 +-
drivers/gpio/gpio-ep93xx.c | 3 +
7 files changed, 107 insertions(+), 107 deletions(-)
create mode 100644 arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index a82265b..2432a6b 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -39,6 +39,7 @@
#include <mach/fb.h>
#include <mach/ep93xx_keypad.h>
#include <mach/ep93xx_spi.h>
+#include <mach/gpio-ep93xx.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index ace49ee..70ef8c5 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -37,6 +37,7 @@
#include <mach/hardware.h>
#include <mach/fb.h>
#include <mach/ep93xx_spi.h>
+#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
new file mode 100644
index 0000000..8aff2ea
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
@@ -0,0 +1,100 @@
+/* Include file for the EP93XX GPIO controller machine specifics */
+
+#ifndef __GPIO_EP93XX_H
+#define __GPIO_EP93XX_H
+
+/* GPIO port A. */
+#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
+#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
+#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
+#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
+#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
+#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
+#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
+#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
+#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
+
+/* GPIO port B. */
+#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
+#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
+#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
+#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
+#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
+#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
+#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
+#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
+#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
+
+/* GPIO port C. */
+#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
+#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
+#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
+#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
+#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
+#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
+#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
+#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
+#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
+
+/* GPIO port D. */
+#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
+#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
+#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
+#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
+#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
+#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
+#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
+#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
+#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
+
+/* GPIO port E. */
+#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
+#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
+#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
+#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
+#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
+#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
+#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
+#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
+#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
+
+/* GPIO port F. */
+#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
+#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
+#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
+#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
+#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
+#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
+#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
+#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
+#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
+
+/* GPIO port G. */
+#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
+#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
+#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
+#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
+#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
+#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
+#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
+#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
+#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
+
+/* GPIO port H. */
+#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
+#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
+#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
+#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
+#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
+#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
+#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
+#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
+#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
+
+/* maximum value for gpio line identifiers */
+#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
+
+/* maximum value for irq capable line identifiers */
+#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
+
+#endif /* __GPIO_EP93XX_H */
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h
index 76c68fa..e69de29 100644
--- a/arch/arm/mach-ep93xx/include/mach/gpio.h
+++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
@@ -1,105 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/gpio.h
- */
-
-#ifndef __ASM_ARCH_GPIO_H
-#define __ASM_ARCH_GPIO_H
-
-/* GPIO port A. */
-#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
-#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
-#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
-#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
-#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
-#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
-#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
-#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
-#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
-
-/* GPIO port B. */
-#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
-#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
-#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
-#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
-#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
-#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
-#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
-#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
-#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
-
-/* GPIO port C. */
-#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
-#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
-#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
-#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
-#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
-#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
-#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
-#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
-#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
-
-/* GPIO port D. */
-#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
-#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
-#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
-#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
-#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
-#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
-#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
-#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
-#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
-
-/* GPIO port E. */
-#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
-#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
-#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
-#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
-#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
-#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
-#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
-#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
-#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
-
-/* GPIO port F. */
-#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
-#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
-#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
-#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
-#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
-#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
-#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
-#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
-#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
-
-/* GPIO port G. */
-#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
-#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
-#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
-#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
-#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
-#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
-#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
-#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
-#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
-
-/* GPIO port H. */
-#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
-#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
-#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
-#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
-#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
-#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
-#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
-#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
-#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
-
-/* maximum value for gpio line identifiers */
-#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
-
-/* maximum value for irq capable line identifiers */
-#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
-
-#define gpio_to_irq __gpio_to_irq
-#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
-
-#endif
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 9ae4ea1..52e090d 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -18,12 +18,12 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <mach/hardware.h>
#include <mach/fb.h>
+#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 3cea81f..8121e3a 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
-#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/fb.h>
@@ -30,6 +29,7 @@
#include <mach/hardware.h>
#include <mach/fb.h>
+#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 6a56895..386d9ff 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -24,6 +24,9 @@
#include <linux/module.h>
#include <mach/hardware.h>
+#include <mach/gpio-ep93xx.h>
+
+#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
struct ep93xx_gpio {
void __iomem *mmio_base;
--
1.7.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-09-20 8:42 [PATCH v2] mach-ep93xx: break out GPIO driver specifics Linus Walleij
@ 2011-09-20 17:40 ` Grant Likely
2011-09-20 20:32 ` Linus Walleij
2011-09-20 17:43 ` H Hartley Sweeten
2011-10-15 18:18 ` Mika Westerberg
2 siblings, 1 reply; 10+ messages in thread
From: Grant Likely @ 2011-09-20 17:40 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 20, 2011 at 10:42:12AM +0200, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> The <mach/gpio.h> file is included from upper directories
> and deal with generic GPIO and gpiolib stuff. Break out the
> platform and driver specific defines and functions into its own
> header file.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Move the irq_to_gpio() into the driver since it was the only
> thing actually using it, as a result the ep93xx gpio.h
> is trivial and becomes empty.
> - Putting this into the patch tracker as 7042/2 soon-ish.
> ---
> arch/arm/mach-ep93xx/core.c | 1 +
> arch/arm/mach-ep93xx/edb93xx.c | 1 +
> arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | 100 +++++++++++++++++++++
> arch/arm/mach-ep93xx/include/mach/gpio.h | 105 -----------------------
Please use the --find-renames flag for patches like this, but otherwise:
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Which tree will this go through? I don't think it should go via the
gpio tree since it is mostly within arch/arm.
g.
> arch/arm/mach-ep93xx/simone.c | 2 +-
> arch/arm/mach-ep93xx/snappercl15.c | 2 +-
> drivers/gpio/gpio-ep93xx.c | 3 +
> 7 files changed, 107 insertions(+), 107 deletions(-)
> create mode 100644 arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
>
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index a82265b..2432a6b 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -39,6 +39,7 @@
> #include <mach/fb.h>
> #include <mach/ep93xx_keypad.h>
> #include <mach/ep93xx_spi.h>
> +#include <mach/gpio-ep93xx.h>
>
> #include <asm/mach/map.h>
> #include <asm/mach/time.h>
> diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
> index ace49ee..70ef8c5 100644
> --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -37,6 +37,7 @@
> #include <mach/hardware.h>
> #include <mach/fb.h>
> #include <mach/ep93xx_spi.h>
> +#include <mach/gpio-ep93xx.h>
>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
> diff --git a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
> new file mode 100644
> index 0000000..8aff2ea
> --- /dev/null
> +++ b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
> @@ -0,0 +1,100 @@
> +/* Include file for the EP93XX GPIO controller machine specifics */
> +
> +#ifndef __GPIO_EP93XX_H
> +#define __GPIO_EP93XX_H
> +
> +/* GPIO port A. */
> +#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
> +#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
> +#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
> +#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
> +#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
> +#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
> +#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
> +#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
> +#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
> +
> +/* GPIO port B. */
> +#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
> +#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
> +#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
> +#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
> +#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
> +#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
> +#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
> +#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
> +#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
> +
> +/* GPIO port C. */
> +#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
> +#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
> +#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
> +#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
> +#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
> +#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
> +#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
> +#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
> +#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
> +
> +/* GPIO port D. */
> +#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
> +#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
> +#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
> +#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
> +#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
> +#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
> +#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
> +#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
> +#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
> +
> +/* GPIO port E. */
> +#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
> +#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
> +#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
> +#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
> +#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
> +#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
> +#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
> +#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
> +#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
> +
> +/* GPIO port F. */
> +#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
> +#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
> +#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
> +#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
> +#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
> +#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
> +#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
> +#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
> +#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
> +
> +/* GPIO port G. */
> +#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
> +#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
> +#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
> +#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
> +#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
> +#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
> +#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
> +#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
> +#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
> +
> +/* GPIO port H. */
> +#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
> +#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
> +#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
> +#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
> +#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
> +#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
> +#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
> +#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
> +#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
> +
> +/* maximum value for gpio line identifiers */
> +#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
> +
> +/* maximum value for irq capable line identifiers */
> +#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
> +
> +#endif /* __GPIO_EP93XX_H */
> diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h
> index 76c68fa..e69de29 100644
> --- a/arch/arm/mach-ep93xx/include/mach/gpio.h
> +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
> @@ -1,105 +0,0 @@
> -/*
> - * arch/arm/mach-ep93xx/include/mach/gpio.h
> - */
> -
> -#ifndef __ASM_ARCH_GPIO_H
> -#define __ASM_ARCH_GPIO_H
> -
> -/* GPIO port A. */
> -#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
> -#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
> -#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
> -#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
> -#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
> -#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
> -#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
> -#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
> -#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
> -
> -/* GPIO port B. */
> -#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
> -#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
> -#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
> -#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
> -#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
> -#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
> -#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
> -#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
> -#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
> -
> -/* GPIO port C. */
> -#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
> -#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
> -#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
> -#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
> -#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
> -#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
> -#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
> -#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
> -#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
> -
> -/* GPIO port D. */
> -#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
> -#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
> -#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
> -#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
> -#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
> -#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
> -#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
> -#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
> -#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
> -
> -/* GPIO port E. */
> -#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
> -#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
> -#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
> -#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
> -#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
> -#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
> -#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
> -#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
> -#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
> -
> -/* GPIO port F. */
> -#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
> -#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
> -#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
> -#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
> -#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
> -#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
> -#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
> -#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
> -#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
> -
> -/* GPIO port G. */
> -#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
> -#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
> -#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
> -#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
> -#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
> -#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
> -#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
> -#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
> -#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
> -
> -/* GPIO port H. */
> -#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
> -#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
> -#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
> -#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
> -#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
> -#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
> -#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
> -#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
> -#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
> -
> -/* maximum value for gpio line identifiers */
> -#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
> -
> -/* maximum value for irq capable line identifiers */
> -#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
> -
> -#define gpio_to_irq __gpio_to_irq
> -#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
> -
> -#endif
> diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
> index 9ae4ea1..52e090d 100644
> --- a/arch/arm/mach-ep93xx/simone.c
> +++ b/arch/arm/mach-ep93xx/simone.c
> @@ -18,12 +18,12 @@
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/platform_device.h>
> -#include <linux/gpio.h>
> #include <linux/i2c.h>
> #include <linux/i2c-gpio.h>
>
> #include <mach/hardware.h>
> #include <mach/fb.h>
> +#include <mach/gpio-ep93xx.h>
>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
> diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
> index 3cea81f..8121e3a 100644
> --- a/arch/arm/mach-ep93xx/snappercl15.c
> +++ b/arch/arm/mach-ep93xx/snappercl15.c
> @@ -20,7 +20,6 @@
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/io.h>
> -#include <linux/gpio.h>
> #include <linux/i2c.h>
> #include <linux/i2c-gpio.h>
> #include <linux/fb.h>
> @@ -30,6 +29,7 @@
>
> #include <mach/hardware.h>
> #include <mach/fb.h>
> +#include <mach/gpio-ep93xx.h>
>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
> diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
> index 6a56895..386d9ff 100644
> --- a/drivers/gpio/gpio-ep93xx.c
> +++ b/drivers/gpio/gpio-ep93xx.c
> @@ -24,6 +24,9 @@
> #include <linux/module.h>
>
> #include <mach/hardware.h>
> +#include <mach/gpio-ep93xx.h>
> +
> +#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
>
> struct ep93xx_gpio {
> void __iomem *mmio_base;
> --
> 1.7.3.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-09-20 8:42 [PATCH v2] mach-ep93xx: break out GPIO driver specifics Linus Walleij
2011-09-20 17:40 ` Grant Likely
@ 2011-09-20 17:43 ` H Hartley Sweeten
2011-10-15 18:18 ` Mika Westerberg
2 siblings, 0 replies; 10+ messages in thread
From: H Hartley Sweeten @ 2011-09-20 17:43 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday, September 20, 2011 1:42 AM, Linus Walleij wrote:
>
> From: Linus Walleij <linus.walleij@linaro.org>
>
> The <mach/gpio.h> file is included from upper directories
> and deal with generic GPIO and gpiolib stuff. Break out the
> platform and driver specific defines and functions into its own
> header file.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Move the irq_to_gpio() into the driver since it was the only
> thing actually using it, as a result the ep93xx gpio.h
> is trivial and becomes empty.
> - Putting this into the patch tracker as 7042/2 soon-ish.
> ---
> arch/arm/mach-ep93xx/core.c | 1 +
> arch/arm/mach-ep93xx/edb93xx.c | 1 +
> arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | 100 +++++++++++++++++++++
> arch/arm/mach-ep93xx/include/mach/gpio.h | 105 -----------------------
> arch/arm/mach-ep93xx/simone.c | 2 +-
> arch/arm/mach-ep93xx/snappercl15.c | 2 +-
> drivers/gpio/gpio-ep93xx.c | 3 +
> 7 files changed, 107 insertions(+), 107 deletions(-)
> create mode 100644 arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-09-20 17:40 ` Grant Likely
@ 2011-09-20 20:32 ` Linus Walleij
2011-10-01 22:39 ` Russell King - ARM Linux
0 siblings, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2011-09-20 20:32 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 20, 2011 at 7:40 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Tue, Sep 20, 2011 at 10:42:12AM +0200, Linus Walleij wrote:
>> From: Linus Walleij <linus.walleij@linaro.org>
>>
>> The <mach/gpio.h> file is included from upper directories
>> and deal with generic GPIO and gpiolib stuff. Break out the
>> platform and driver specific defines and functions into its own
>> header file.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ChangeLog v1->v2:
>> - Move the irq_to_gpio() into the driver since it was the only
>> ? thing actually using it, as a result the ep93xx gpio.h
>> ? is trivial and becomes empty.
>> - Putting this into the patch tracker as 7042/2 soon-ish.
>> ---
>> ?arch/arm/mach-ep93xx/core.c ? ? ? ? ? ? ? ? ? ? | ? ?1 +
>> ?arch/arm/mach-ep93xx/edb93xx.c ? ? ? ? ? ? ? ? ?| ? ?1 +
>> ?arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | ?100 +++++++++++++++++++++
>> ?arch/arm/mach-ep93xx/include/mach/gpio.h ? ? ? ?| ?105 -----------------------
>
> Please use the --find-renames flag for patches like this, but otherwise:
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
Thanks, I'll fix that.
> Which tree will this go through? ?I don't think it should go via the
> gpio tree since it is mostly within arch/arm.
It'd dependent on Russells cleanups so it'll go through Russells
tree and his gpio cleanup branch there.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-09-20 20:32 ` Linus Walleij
@ 2011-10-01 22:39 ` Russell King - ARM Linux
2011-10-02 21:15 ` Linus Walleij
0 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-10-01 22:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 20, 2011 at 10:32:13PM +0200, Linus Walleij wrote:
> On Tue, Sep 20, 2011 at 7:40 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> > Which tree will this go through? ?I don't think it should go via the
> > gpio tree since it is mostly within arch/arm.
>
> It'd dependent on Russells cleanups so it'll go through Russells
> tree and his gpio cleanup branch there.
It's dependent on other stuff elsewhere too:
error: patch failed: drivers/gpio/gpio-ep93xx.c:24
error: drivers/gpio/gpio-ep93xx.c: patch does not apply
According to your patch, line 24 onwards is:
#include <linux/module.h>
#include <mach/hardware.h>
whereas I have this around line 24:
#include <linux/basic_mmio_gpio.h>
#include <mach/hardware.h>
So I've applied this with GNU patch instead, accepting the one line of
fuzz:
Hunk #1 succeeded at 23 with fuzz 1 (offset -1 lines).
As a result, I expect sfr will report a trivial merge conflict here.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-10-01 22:39 ` Russell King - ARM Linux
@ 2011-10-02 21:15 ` Linus Walleij
0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2011-10-02 21:15 UTC (permalink / raw)
To: linux-arm-kernel
2011/10/2 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Tue, Sep 20, 2011 at 10:32:13PM +0200, Linus Walleij wrote:
>
>> It'd dependent on Russells cleanups so it'll go through Russells
>> tree and his gpio cleanup branch there.
>
> It's dependent on other stuff elsewhere too:
>
> error: patch failed: drivers/gpio/gpio-ep93xx.c:24
> error: drivers/gpio/gpio-ep93xx.c: patch does not apply
>
> According to your patch, line 24 onwards is:
>
> ?#include <linux/module.h>
>
> ?#include <mach/hardware.h>
>
> whereas I have this around line 24:
>
> ?#include <linux/basic_mmio_gpio.h>
>
> ?#include <mach/hardware.h>
Aha it's that moduleh git that is changing stuff all over the place.
> So I've applied this with GNU patch instead, accepting the one line of
> fuzz:
>
> Hunk #1 succeeded at 23 with fuzz 1 (offset -1 lines).
>
> As a result, I expect sfr will report a trivial merge conflict here.
OK thanks Russell that seems to get this one in atleast,
if I run into more trouble we should just call it a day with this
stuff for this merge window so we don't get too much conflicts
piled up.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-09-20 8:42 [PATCH v2] mach-ep93xx: break out GPIO driver specifics Linus Walleij
2011-09-20 17:40 ` Grant Likely
2011-09-20 17:43 ` H Hartley Sweeten
@ 2011-10-15 18:18 ` Mika Westerberg
2011-10-15 20:41 ` Russell King - ARM Linux
2 siblings, 1 reply; 10+ messages in thread
From: Mika Westerberg @ 2011-10-15 18:18 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 20, 2011 at 10:42:12AM +0200, Linus Walleij wrote:
> arch/arm/mach-ep93xx/core.c | 1 +
> arch/arm/mach-ep93xx/edb93xx.c | 1 +
> arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | 100 +++++++++++++++++++++
> arch/arm/mach-ep93xx/include/mach/gpio.h | 105 -----------------------
I just tried to compile latest linux-next and due to missing <mach/gpio.h> I
get:
In file included from include/linux/gpio.h:18:0,
from drivers/gpio/gpiolib.c:10:
/home/westeri/devel/kernel/linux/arch/arm/include/asm/gpio.h:5:23: fatal error: mach/gpio.h: No such file or directory
compilation terminated.
make[2]: *** [drivers/gpio/gpiolib.o] Error 1
It looks like arch/arm/include/asm/gpio.h wants to have <mach/gpio.h>. Any idea
how to fix this?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-10-15 18:18 ` Mika Westerberg
@ 2011-10-15 20:41 ` Russell King - ARM Linux
2011-10-16 7:39 ` Mika Westerberg
2011-10-16 10:57 ` Linus Walleij
0 siblings, 2 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-10-15 20:41 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 15, 2011 at 09:18:08PM +0300, Mika Westerberg wrote:
> I just tried to compile latest linux-next and due to missing <mach/gpio.h> I
> get:
>
> In file included from include/linux/gpio.h:18:0,
> from drivers/gpio/gpiolib.c:10:
> /home/westeri/devel/kernel/linux/arch/arm/include/asm/gpio.h:5:23: fatal error: mach/gpio.h: No such file or directory
> compilation terminated.
> make[2]: *** [drivers/gpio/gpiolib.o] Error 1
>
> It looks like arch/arm/include/asm/gpio.h wants to have <mach/gpio.h>. Any idea
> how to fix this?
Hmm. It shouldn't have been deleted - Linus' patch leaves the file
empty rather than deleting it.
However, as I had to use GNU patch to apply Linus' patch (as git apply
wouldn't because of fuzz), it doesn't understand that, so it removed it.
This is where having an /* empty */ comment avoids that kind of thing,
just like I've done for all the other mach/gpio.h which became empty.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-10-15 20:41 ` Russell King - ARM Linux
@ 2011-10-16 7:39 ` Mika Westerberg
2011-10-16 10:57 ` Linus Walleij
1 sibling, 0 replies; 10+ messages in thread
From: Mika Westerberg @ 2011-10-16 7:39 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 15, 2011 at 09:41:30PM +0100, Russell King - ARM Linux wrote:
>
> Hmm. It shouldn't have been deleted - Linus' patch leaves the file
> empty rather than deleting it.
>
> However, as I had to use GNU patch to apply Linus' patch (as git apply
> wouldn't because of fuzz), it doesn't understand that, so it removed it.
> This is where having an /* empty */ comment avoids that kind of thing,
> just like I've done for all the other mach/gpio.h which became empty.
Ok, thanks for the explanation.
I'll send a patch which fixes this later today.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mach-ep93xx: break out GPIO driver specifics
2011-10-15 20:41 ` Russell King - ARM Linux
2011-10-16 7:39 ` Mika Westerberg
@ 2011-10-16 10:57 ` Linus Walleij
1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2011-10-16 10:57 UTC (permalink / raw)
To: linux-arm-kernel
2011/10/15 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> However, as I had to use GNU patch to apply Linus' patch (as git apply
> wouldn't because of fuzz), it doesn't understand that, so it removed it.
> This is where having an /* empty */ comment avoids that kind of thing,
> just like I've done for all the other mach/gpio.h which became empty.
OK now I understand what happened, I'll have the /* empty */ comment
in them from now on...
Thanks,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-10-16 10:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 8:42 [PATCH v2] mach-ep93xx: break out GPIO driver specifics Linus Walleij
2011-09-20 17:40 ` Grant Likely
2011-09-20 20:32 ` Linus Walleij
2011-10-01 22:39 ` Russell King - ARM Linux
2011-10-02 21:15 ` Linus Walleij
2011-09-20 17:43 ` H Hartley Sweeten
2011-10-15 18:18 ` Mika Westerberg
2011-10-15 20:41 ` Russell King - ARM Linux
2011-10-16 7:39 ` Mika Westerberg
2011-10-16 10:57 ` Linus Walleij
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).