diff options
author | Cyril Chemparathy <cyril@ti.com> | 2010-05-01 18:37:55 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-05-06 18:02:09 -0400 |
commit | b27b6d03f245e5eaf6473da58a2612077fb7cfe7 (patch) | |
tree | b6ed359c8b604edcaed5025aa83c57d77daec1a9 /arch/arm/mach-davinci/include/mach/gpio.h | |
parent | 686b634a07451fc4fe3b712fe211bfa861a53241 (diff) |
Davinci: gpio - fine grained locking
This patch eliminates the global gpio_lock, and implements a per-controller
lock instead. This also switches to irqsave/irqrestore locks in case gpios
are manipulated in isr.
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/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/gpio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index 9a71a26eb77f..504cc180a60b 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #define __DAVINCI_GPIO_H | 14 | #define __DAVINCI_GPIO_H |
15 | 15 | ||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/spinlock.h> | ||
18 | |||
17 | #include <asm-generic/gpio.h> | 19 | #include <asm-generic/gpio.h> |
18 | 20 | ||
19 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
@@ -52,6 +54,7 @@ enum davinci_gpio_type { | |||
52 | struct davinci_gpio_controller { | 54 | struct davinci_gpio_controller { |
53 | struct gpio_chip chip; | 55 | struct gpio_chip chip; |
54 | int irq_base; | 56 | int irq_base; |
57 | spinlock_t lock; | ||
55 | void __iomem *regs; | 58 | void __iomem *regs; |
56 | void __iomem *set_data; | 59 | void __iomem *set_data; |
57 | void __iomem *clr_data; | 60 | void __iomem *clr_data; |