aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p/include
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-10-01 10:40:37 +0900
committerKukjin Kim <kgene.kim@samsung.com>2010-10-21 07:54:56 +0900
commit170a46177094b390299d1206748d7f15cd375dc9 (patch)
tree81fc5270bbc74d1cf946b2ed265fb85c4dee3ed8 /arch/arm/plat-s5p/include
parentca1931ca1e87c32f9abaef378c6996b25774cb02 (diff)
downloadkernel_samsung_smdk4412-170a46177094b390299d1206748d7f15cd375dc9.zip
kernel_samsung_smdk4412-170a46177094b390299d1206748d7f15cd375dc9.tar.gz
kernel_samsung_smdk4412-170a46177094b390299d1206748d7f15cd375dc9.tar.bz2
ARM: S5P: Add common S5P GPIO Interrupt support
This patch adds common code to enable support of GPIO interrupt on S5P SoCs. The total number of GPIO pins is quite large on S5P SoCs. Registering irq support for all of them would be a resource waste. Because of that the interrupt support for standard GPIO pins is registered dynamically by the s5p_register_gpio_interrupt() function. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> [kgene.kim@samsung.com: minor title fixes] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p/include')
-rw-r--r--arch/arm/plat-s5p/include/plat/irqs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-s5p/include/plat/irqs.h
index 3fb3a3a..23603c7 100644
--- a/arch/arm/plat-s5p/include/plat/irqs.h
+++ b/arch/arm/plat-s5p/include/plat/irqs.h
@@ -94,4 +94,13 @@
((irq) - S5P_EINT_BASE1) : \
((irq) + 16 - S5P_EINT_BASE2))
+/* Typically only a few gpio chips require gpio interrupt support.
+ To avoid memory waste irq descriptors are allocated only for
+ S5P_GPIOINT_GROUP_COUNT chips, each with total number of
+ S5P_GPIOINT_GROUP_SIZE pins/irqs. Each GPIOINT group can be assiged
+ to any gpio chip with the s5p_register_gpio_interrupt() function */
+#define S5P_GPIOINT_GROUP_COUNT 4
+#define S5P_GPIOINT_GROUP_SIZE 8
+#define S5P_GPIOINT_COUNT (S5P_GPIOINT_GROUP_COUNT * S5P_GPIOINT_GROUP_SIZE)
+
#endif /* __ASM_PLAT_S5P_IRQS_H */