Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77502
b: refs/heads/master
c: c27cb68
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Jan 28, 2008
1 parent 8e4005f commit 3356a3d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b8c0088404778a1291191cf140bcfea082f027c
refs/heads/master: c27cb681ac1598352569f75cb19850a12b7ef102
16 changes: 16 additions & 0 deletions trunk/arch/arm/plat-s3c24xx/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,19 @@ int s3c2410_gpio_getirq(unsigned int pin)
}

EXPORT_SYMBOL(s3c2410_gpio_getirq);

int s3c2410_gpio_irq2pin(unsigned int irq)
{
if (irq >= IRQ_EINT0 && irq <= IRQ_EINT3)
return S3C2410_GPF0 + (irq - IRQ_EINT0);

if (irq >= IRQ_EINT4 && irq <= IRQ_EINT7)
return S3C2410_GPF4 + (irq - IRQ_EINT4);

if (irq >= IRQ_EINT8 && irq <= IRQ_EINT23)
return S3C2410_GPG0 + (irq - IRQ_EINT8);

return -EINVAL;
}

EXPORT_SYMBOL(s3c2410_gpio_irq2pin);
11 changes: 11 additions & 0 deletions trunk/include/asm-arm/arch-s3c2410/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);

extern int s3c2410_gpio_getirq(unsigned int pin);

/* s3c2410_gpio_irq2pin
*
* turn the given irq number into the corresponding GPIO number
*
* returns:
* < 0 = no pin
* >=0 = gpio pin number
*/

extern int s3c2410_gpio_irq2pin(unsigned int irq);

#ifdef CONFIG_CPU_S3C2400

extern int s3c2400_gpio_getirq(unsigned int pin);
Expand Down

0 comments on commit 3356a3d

Please sign in to comment.