summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/include
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-05-02 00:37:52 +0200
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-07 00:02:08 +0200
commit99e9e52de635728d7c89a0fdf79b307f3082cf3a (patch)
tree554517b1dc2552819954174c8ddafd3927f34970 /arch/arm/mach-davinci/include
parentDavinci: gpio - minor cleanup (diff)
downloadlinux-99e9e52de635728d7c89a0fdf79b307f3082cf3a.tar.xz
linux-99e9e52de635728d7c89a0fdf79b307f3082cf3a.zip
Davinci: gpio - structs and functions renamed
Renamed gpio types to something more sensible: struct gpio_controller --> struct davinci_gpio_regs struct davinci_gpio --> struct davinci_gpio_controller gpio2controller() --> gpio2regs() irq2controller() --> irq2regs() This change also moves davinci_gpio_controller definition to gpio.h. Eventually, the gpio registers structure will be moved to gpio.c and no longer a common cross-soc definition. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Tested-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include')
-rw-r--r--arch/arm/mach-davinci/include/mach/gpio.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
index 0099e6e5aff8..bdab001950ba 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -45,7 +45,7 @@
/* Convert GPIO signal to GPIO pin number */
#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))
-struct gpio_controller {
+struct davinci_gpio_regs {
u32 dir;
u32 out_data;
u32 set_data;
@@ -58,6 +58,12 @@ struct gpio_controller {
u32 intstat;
};
+struct davinci_gpio_controller {
+ struct davinci_gpio_regs __iomem *regs;
+ struct gpio_chip chip;
+ int irq_base;
+};
+
/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
* with constant parameters; or in outlined code they execute at runtime.
*
@@ -67,7 +73,7 @@ struct gpio_controller {
*
* These are NOT part of the cross-platform GPIO interface
*/
-static inline struct gpio_controller __iomem *
+static inline struct davinci_gpio_regs __iomem *
__gpio_to_controller(unsigned gpio)
{
void __iomem *ptr;
@@ -102,7 +108,7 @@ static inline u32 __gpio_mask(unsigned gpio)
static inline void gpio_set_value(unsigned gpio, int value)
{
if (__builtin_constant_p(value) && gpio < DAVINCI_N_GPIO) {
- struct gpio_controller __iomem *g;
+ struct davinci_gpio_regs __iomem *g;
u32 mask;
g = __gpio_to_controller(gpio);
@@ -128,7 +134,7 @@ static inline void gpio_set_value(unsigned gpio, int value)
*/
static inline int gpio_get_value(unsigned gpio)
{
- struct gpio_controller __iomem *g;
+ struct davinci_gpio_regs __iomem *g;
if (!__builtin_constant_p(gpio) || gpio >= DAVINCI_N_GPIO)
return __gpio_get_value(gpio);