diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-07 14:55:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-07 14:55:40 -0800 |
commit | 3d4248885b9fca818e7fe6b66328e714876d36ad (patch) | |
tree | 5335c767060dc78886aa0b23c120c235ef929a05 /arch/arm/mach-s3c2410/gpio.c | |
parent | edd106fc8ac1826dbe231b70ce0762db24133e5c (diff) | |
parent | 5e7098275094ec405f2b19285ec0c38aead42d53 (diff) | |
download | linux-stable-3d4248885b9fca818e7fe6b66328e714876d36ad.tar.gz linux-stable-3d4248885b9fca818e7fe6b66328e714876d36ad.tar.bz2 linux-stable-3d4248885b9fca818e7fe6b66328e714876d36ad.zip |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3927/1: Allow show_mem() to work with holes in memory map.
[ARM] 3926/1: make timer led handle HZ != 100
[ARM] 3923/1: S3C24XX: update s3c2410_defconfig with new drivers
[ARM] 3922/1: S3C24XX: update s3c2410_defconfig to 2.6.19-rc4
[ARM] 3921/1: S3C24XX: remove bast_defconfig
[ARM] 3920/1: S3C24XX: Remove smdk2410_defconfig
[ARM] 3919/1: Fixed definition of some PXA270 CIF related registers
[ARM] 3918/1: ixp4xx irq-chip rework
[ARM] 3912/1: Make PXA270 advertise HWCAP_IWMMXT capability
[ARM] 3915/1: S3C2412: Add s3c2410_gpio_getirq() to general gpio.c
[ARM] 3917/1: Fix dmabounce symbol exports
Diffstat (limited to 'arch/arm/mach-s3c2410/gpio.c')
-rw-r--r-- | arch/arm/mach-s3c2410/gpio.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c index db6393c99860..ba346546150b 100644 --- a/arch/arm/mach-s3c2410/gpio.c +++ b/arch/arm/mach-s3c2410/gpio.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 Simtec Electronics * Ben Dooks <ben@simtec.co.uk> * - * S3C2410 GPIO support + * S3C24XX GPIO support * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -163,3 +163,22 @@ unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change) } EXPORT_SYMBOL(s3c2410_modify_misccr); + +int s3c2410_gpio_getirq(unsigned int pin) +{ + if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15) + return -1; /* not valid interrupts */ + + if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) + return -1; /* not valid pin */ + + if (pin < S3C2410_GPF4) + return (pin - S3C2410_GPF0) + IRQ_EINT0; + + if (pin < S3C2410_GPG0) + return (pin - S3C2410_GPF4) + IRQ_EINT4; + + return (pin - S3C2410_GPG0) + IRQ_EINT8; +} + +EXPORT_SYMBOL(s3c2410_gpio_getirq); |