aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-prima2
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2012-06-19 03:00:05 -0400
committerBarry Song <Barry.Song@csr.com>2012-07-01 22:59:07 -0400
commit5130216265f6f924a4ba8214787241be96d93467 (patch)
tree8e05e98068f0380376735a8575af9bb42ab27502 /arch/arm/mach-prima2
parentca24a145573124732152daff105ba68cc9a2b545 (diff)
PINCTRL: SiRF: add GPIO and GPIO irq support in CSR SiRFprimaII
In SiRFprimaII, Each GPIO pin can be configured as input or output independently. If a GPIO is configured as input, it can also be enabled as an interrupt source (either edge or level triggered). These pins must be either MUXed as GPIO or other function pads. Signed-off-by: Yuping Luo <yuping.luo@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-prima2')
-rw-r--r--arch/arm/mach-prima2/include/mach/gpio.h13
-rw-r--r--arch/arm/mach-prima2/include/mach/irqs.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-prima2/include/mach/gpio.h
new file mode 100644
index 000000000000..1904bb03876e
--- /dev/null
+++ b/arch/arm/mach-prima2/include/mach/gpio.h
@@ -0,0 +1,13 @@
1#ifndef __MACH_GPIO_H
2#define __MACH_GPIO_H
3
4/* Pull up/down values */
5enum sirfsoc_gpio_pull {
6 SIRFSOC_GPIO_PULL_NONE,
7 SIRFSOC_GPIO_PULL_UP,
8 SIRFSOC_GPIO_PULL_DOWN,
9};
10
11void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode);
12
13#endif
diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-prima2/include/mach/irqs.h
index bb354f952fd6..f6014a07541f 100644
--- a/arch/arm/mach-prima2/include/mach/irqs.h
+++ b/arch/arm/mach-prima2/include/mach/irqs.h
@@ -11,7 +11,7 @@
11 11
12#define SIRFSOC_INTENAL_IRQ_START 0 12#define SIRFSOC_INTENAL_IRQ_START 0
13#define SIRFSOC_INTENAL_IRQ_END 59 13#define SIRFSOC_INTENAL_IRQ_END 59
14 14#define SIRFSOC_GPIO_IRQ_START (SIRFSOC_INTENAL_IRQ_END + 1)
15#define NR_IRQS 220 15#define NR_IRQS 220
16 16
17#endif 17#endif