From 5130216265f6f924a4ba8214787241be96d93467 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Tue, 19 Jun 2012 15:00:05 +0800 Subject: 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 Signed-off-by: Barry Song Acked-by: Linus Walleij --- arch/arm/mach-prima2/include/mach/gpio.h | 13 +++++++++++++ arch/arm/mach-prima2/include/mach/irqs.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-prima2/include/mach/gpio.h (limited to 'arch/arm/mach-prima2') 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 @@ +#ifndef __MACH_GPIO_H +#define __MACH_GPIO_H + +/* Pull up/down values */ +enum sirfsoc_gpio_pull { + SIRFSOC_GPIO_PULL_NONE, + SIRFSOC_GPIO_PULL_UP, + SIRFSOC_GPIO_PULL_DOWN, +}; + +void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode); + +#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 @@ #define SIRFSOC_INTENAL_IRQ_START 0 #define SIRFSOC_INTENAL_IRQ_END 59 - +#define SIRFSOC_GPIO_IRQ_START (SIRFSOC_INTENAL_IRQ_END + 1) #define NR_IRQS 220 #endif -- cgit v1.2.3-59-g8ed1b