aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c64xx/gpiolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c64xx/gpiolib.c')
-rw-r--r--arch/arm/plat-s3c64xx/gpiolib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c64xx/gpiolib.c b/arch/arm/plat-s3c64xx/gpiolib.c
index 92859290ea33..778560457277 100644
--- a/arch/arm/plat-s3c64xx/gpiolib.c
+++ b/arch/arm/plat-s3c64xx/gpiolib.c
@@ -213,6 +213,11 @@ static struct s3c_gpio_cfg gpio_4bit_cfg_eint0011 = {
213 .get_pull = s3c_gpio_getpull_updown, 213 .get_pull = s3c_gpio_getpull_updown,
214}; 214};
215 215
216int s3c64xx_gpio2int_gpm(struct gpio_chip *chip, unsigned pin)
217{
218 return pin < 5 ? IRQ_EINT(23) + pin : -ENXIO;
219}
220
216static struct s3c_gpio_chip gpio_4bit[] = { 221static struct s3c_gpio_chip gpio_4bit[] = {
217 { 222 {
218 .base = S3C64XX_GPA_BASE, 223 .base = S3C64XX_GPA_BASE,
@@ -269,10 +274,16 @@ static struct s3c_gpio_chip gpio_4bit[] = {
269 .base = S3C64XX_GPM(0), 274 .base = S3C64XX_GPM(0),
270 .ngpio = S3C64XX_GPIO_M_NR, 275 .ngpio = S3C64XX_GPIO_M_NR,
271 .label = "GPM", 276 .label = "GPM",
277 .to_irq = s3c64xx_gpio2int_gpm,
272 }, 278 },
273 }, 279 },
274}; 280};
275 281
282int s3c64xx_gpio2int_gpl(struct gpio_chip *chip, unsigned pin)
283{
284 return pin >= 8 ? IRQ_EINT(16) + pin - 8 : -ENXIO;
285}
286
276static struct s3c_gpio_chip gpio_4bit2[] = { 287static struct s3c_gpio_chip gpio_4bit2[] = {
277 { 288 {
278 .base = S3C64XX_GPH_BASE + 0x4, 289 .base = S3C64XX_GPH_BASE + 0x4,
@@ -297,6 +308,7 @@ static struct s3c_gpio_chip gpio_4bit2[] = {
297 .base = S3C64XX_GPL(0), 308 .base = S3C64XX_GPL(0),
298 .ngpio = S3C64XX_GPIO_L_NR, 309 .ngpio = S3C64XX_GPIO_L_NR,
299 .label = "GPL", 310 .label = "GPL",
311 .to_irq = s3c64xx_gpio2int_gpl,
300 }, 312 },
301 }, 313 },
302}; 314};