diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2010-09-30 22:24:39 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-20 18:54:57 -0400 |
commit | 8ce14a221efe8ef9019e2c5b1e06fcd329e66d78 (patch) | |
tree | 1fab3fd0c7e73ec9da6d84a47e4471bd0919ea73 /arch/arm/plat-s3c24xx | |
parent | 02c38497d668f46467e8ec57a243be0be5bd7f85 (diff) |
ARM: SAMSUNG: Add common samsung_gpiolib_to_irq function
This patch adds a common callback for gpio_to_irq() for external and
gpio interrupts for Samsung SoCs.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
[kgene.kim@samsung.com: moved samsung_gpiolib_to_irq() for s3c24xx build]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r-- | arch/arm/plat-s3c24xx/gpiolib.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 4c0896f2572d..243b6411050d 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c | |||
@@ -74,11 +74,6 @@ static int s3c24xx_gpiolib_bankf_toirq(struct gpio_chip *chip, unsigned offset) | |||
74 | return -EINVAL; | 74 | return -EINVAL; |
75 | } | 75 | } |
76 | 76 | ||
77 | static int s3c24xx_gpiolib_bankg_toirq(struct gpio_chip *chip, unsigned offset) | ||
78 | { | ||
79 | return IRQ_EINT8 + offset; | ||
80 | } | ||
81 | |||
82 | static struct s3c_gpio_cfg s3c24xx_gpiocfg_banka = { | 77 | static struct s3c_gpio_cfg s3c24xx_gpiocfg_banka = { |
83 | .set_config = s3c_gpio_setcfg_s3c24xx_a, | 78 | .set_config = s3c_gpio_setcfg_s3c24xx_a, |
84 | .get_config = s3c_gpio_getcfg_s3c24xx_a, | 79 | .get_config = s3c_gpio_getcfg_s3c24xx_a, |
@@ -157,12 +152,13 @@ struct s3c_gpio_chip s3c24xx_gpios[] = { | |||
157 | [6] = { | 152 | [6] = { |
158 | .base = S3C2410_GPGCON, | 153 | .base = S3C2410_GPGCON, |
159 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 154 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
155 | .irq_base = IRQ_EINT8, | ||
160 | .chip = { | 156 | .chip = { |
161 | .base = S3C2410_GPG(0), | 157 | .base = S3C2410_GPG(0), |
162 | .owner = THIS_MODULE, | 158 | .owner = THIS_MODULE, |
163 | .label = "GPIOG", | 159 | .label = "GPIOG", |
164 | .ngpio = 16, | 160 | .ngpio = 16, |
165 | .to_irq = s3c24xx_gpiolib_bankg_toirq, | 161 | .to_irq = samsung_gpiolib_to_irq, |
166 | }, | 162 | }, |
167 | }, { | 163 | }, { |
168 | .base = S3C2410_GPHCON, | 164 | .base = S3C2410_GPHCON, |