diff options
| author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
|---|---|---|
| committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
| commit | 0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch) | |
| tree | dcced72d230d69fd0c5816ac6dd03ab84799a93e /arch/arm/mach-s3c2410/gpio.c | |
| parent | e138a5d2356729b8752e88520cc1525fae9794ac (diff) | |
| parent | f26b90440cd74c78fe10c9bd5160809704a9627c (diff) | |
Merge ../scsi-rc-fixes-2.6
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 @@ | |||
| 3 | * Copyright (c) 2004-2005 Simtec Electronics | 3 | * Copyright (c) 2004-2005 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * | 5 | * |
| 6 | * S3C2410 GPIO support | 6 | * S3C24XX GPIO support |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * 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) | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | EXPORT_SYMBOL(s3c2410_modify_misccr); | 165 | EXPORT_SYMBOL(s3c2410_modify_misccr); |
| 166 | |||
| 167 | int s3c2410_gpio_getirq(unsigned int pin) | ||
| 168 | { | ||
| 169 | if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15) | ||
| 170 | return -1; /* not valid interrupts */ | ||
| 171 | |||
| 172 | if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) | ||
| 173 | return -1; /* not valid pin */ | ||
| 174 | |||
| 175 | if (pin < S3C2410_GPF4) | ||
| 176 | return (pin - S3C2410_GPF0) + IRQ_EINT0; | ||
| 177 | |||
| 178 | if (pin < S3C2410_GPG0) | ||
| 179 | return (pin - S3C2410_GPF4) + IRQ_EINT4; | ||
| 180 | |||
| 181 | return (pin - S3C2410_GPG0) + IRQ_EINT8; | ||
| 182 | } | ||
| 183 | |||
| 184 | EXPORT_SYMBOL(s3c2410_gpio_getirq); | ||
