Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172656
b: refs/heads/master
c: cc64717
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Kunze authored and Thomas Kunze committed Nov 27, 2009
1 parent 92645ea commit 946c625
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 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: 167c55ef80d26679b8b4b4ffba9da208a7c1875d
refs/heads/master: cc647172795713e013f8de4bcdf91860e9e87bff
19 changes: 4 additions & 15 deletions trunk/arch/arm/mach-sa1100/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value)

#define gpio_cansleep __gpio_cansleep

static inline unsigned gpio_to_irq(unsigned gpio)
{
if (gpio < 11)
return IRQ_GPIO0 + gpio;
else
return IRQ_GPIO11 - 11 + gpio;
}

static inline unsigned irq_to_gpio(unsigned irq)
{
if (irq < IRQ_GPIO11_27)
return irq - IRQ_GPIO0;
else
return irq - IRQ_GPIO11 + 11;
}
#define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
(IRQ_GPIO11 - 11 + gpio))
#define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \
(irq - IRQ_GPIO11 + 11))

#endif

0 comments on commit 946c625

Please sign in to comment.