Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284805
b: refs/heads/master
c: f408c98
h: refs/heads/master
i:
  284803: a09e9c4
v: v3
  • Loading branch information
Russell King authored and Grant Likely committed Jan 14, 2012
1 parent 893b68b commit 5b65a02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 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: fda87903f4e9caf87e02d52768c2611e417b7efb
refs/heads/master: f408c985cefc9b1d99bc099e1208dd7df3445aa5
3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-sa1100/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,4 @@ static inline void gpio_set_value(unsigned gpio, int value)

#define gpio_cansleep __gpio_cansleep

#define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
(IRQ_GPIO11 - 11 + gpio))

#endif
6 changes: 6 additions & 0 deletions trunk/drivers/gpio/gpio-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int
return 0;
}

static int sa1100_to_irq(struct gpio_chip *chip, unsigned offset)
{
return offset < 11 ? (IRQ_GPIO0 + offset) : (IRQ_GPIO11 - 11 + offset);
}

static struct gpio_chip sa1100_gpio_chip = {
.label = "gpio",
.direction_input = sa1100_direction_input,
.direction_output = sa1100_direction_output,
.set = sa1100_gpio_set,
.get = sa1100_gpio_get,
.to_irq = sa1100_to_irq,
.base = 0,
.ngpio = GPIO_MAX + 1,
};
Expand Down

0 comments on commit 5b65a02

Please sign in to comment.