Commit bd5f12a2 authored by Linus Walleij's avatar Linus Walleij Committed by Russell King

ARM: 7042/3: mach-ep93xx: break out GPIO driver specifics

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: Ryan Mallon <rmallon@gmail.com>
Acked-by: default avatarHartley Sweeten <hsweeten@visionengravers.com>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ea5abbd2
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <mach/fb.h> #include <mach/fb.h>
#include <mach/ep93xx_keypad.h> #include <mach/ep93xx_keypad.h>
#include <mach/ep93xx_spi.h> #include <mach/ep93xx_spi.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/fb.h> #include <mach/fb.h>
#include <mach/ep93xx_spi.h> #include <mach/ep93xx_spi.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
......
/* /* Include file for the EP93XX GPIO controller machine specifics */
* arch/arm/mach-ep93xx/include/mach/gpio.h
*/
#ifndef __ASM_ARCH_GPIO_H #ifndef __GPIO_EP93XX_H
#define __ASM_ARCH_GPIO_H #define __GPIO_EP93XX_H
/* GPIO port A. */ /* GPIO port A. */
#define EP93XX_GPIO_LINE_A(x) ((x) + 0) #define EP93XX_GPIO_LINE_A(x) ((x) + 0)
...@@ -99,7 +97,4 @@ ...@@ -99,7 +97,4 @@
/* maximum value for irq capable line identifiers */ /* maximum value for irq capable line identifiers */
#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
#define gpio_to_irq __gpio_to_irq #endif /* __GPIO_EP93XX_H */
#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
#endif
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/fb.h> #include <mach/fb.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/fb.h> #include <linux/fb.h>
...@@ -30,6 +29,7 @@ ...@@ -30,6 +29,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/fb.h> #include <mach/fb.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
#include <linux/basic_mmio_gpio.h> #include <linux/basic_mmio_gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/gpio-ep93xx.h>
#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0))
struct ep93xx_gpio { struct ep93xx_gpio {
void __iomem *mmio_base; void __iomem *mmio_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment