Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40787
b: refs/heads/master
c: 94c52fd
h: refs/heads/master
i:
  40785: b4d3975
  40783: 5c113f2
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Nov 2, 2006
1 parent d87e302 commit 67192f5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73218187e8650c08d4e4735dbeeeb860f438da7c
refs/heads/master: 94c52fde553260e86f263448034930abe364faec
21 changes: 20 additions & 1 deletion trunk/arch/arm/mach-s3c2410/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
19 changes: 0 additions & 19 deletions trunk/arch/arm/mach-s3c2410/s3c2410-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,3 @@ int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
}

EXPORT_SYMBOL(s3c2410_gpio_irqfilter);

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);

0 comments on commit 67192f5

Please sign in to comment.