From 453e2dd768de8aa82ee503f1d45395149aa357d6 Mon Sep 17 00:00:00 2001 From: Eunki Kim Date: Tue, 23 Oct 2012 22:39:33 +0900 Subject: ARM: SAMSUNG: Insert bitmap_gpio_int member in samsung_gpio_chip When a device uses GPIO interrupt, its driver assumes that GPIO should be INPUT mode. However, GPIO of SAMSUNG SoC is sepated to INPUT mode and INTERRUPT mode. They are set by 0x0 and 0xF in GPIO control register. If the register is set to INPUT mode, the interrupt never occur. Therefore, it's necessary to set INTERRUPT mode instead of INPUT mode when the pin is used for GPIO interrupt. This patch inserts the bitmap_gpio_int member in struct samsung_ gpio_chip in order to represent use of GPIO interrupt for each pin and sets the related bit when s5p_register_gpio_interrupt function is called. Signed-off-by: Eunki Kim Cc: Grant Likely Cc: Linus Walleij Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/gpio-core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/plat-samsung/include') diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index 1fe6917f6a2..dfd8b7af8c7 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h @@ -48,6 +48,7 @@ struct samsung_gpio_cfg; * @config: special function and pull-resistor control information. * @lock: Lock for exclusive access to this gpio bank. * @pm_save: Save information for suspend/resume support. + * @bitmap_gpio_int: Bitmap for representing GPIO interrupt or not. * * This wrapper provides the necessary information for the Samsung * specific gpios being registered with gpiolib. @@ -71,6 +72,7 @@ struct samsung_gpio_chip { #ifdef CONFIG_PM u32 pm_save[4]; #endif + u32 bitmap_gpio_int; }; static inline struct samsung_gpio_chip *to_samsung_gpio(struct gpio_chip *gpc) -- cgit v1.2.3