Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201439
b: refs/heads/master
c: 6647c6c
h: refs/heads/master
i:
  201437: e3f5aaa
  201435: 5ffae53
  201431: d05ad67
  201423: 2964b18
  201407: c53f26c
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Jun 16, 2010
1 parent b4851a2 commit e8b18f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 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: 5c0c1f08abf094273f40a6d6fd4519fcacc6c58d
refs/heads/master: 6647c6c0b62ae14ca994c5776ddb084820bea808
22 changes: 12 additions & 10 deletions trunk/arch/arm/plat-nomadik/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,6 @@ static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset)
return 0;
}

static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
int val)
{
struct nmk_gpio_chip *nmk_chip =
container_of(chip, struct nmk_gpio_chip, chip);

writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS);
return 0;
}

static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset)
{
struct nmk_gpio_chip *nmk_chip =
Expand All @@ -298,6 +288,18 @@ static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned offset,
writel(bit, nmk_chip->addr + NMK_GPIO_DATC);
}

static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
int val)
{
struct nmk_gpio_chip *nmk_chip =
container_of(chip, struct nmk_gpio_chip, chip);

writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS);
nmk_gpio_set_output(chip, offset, val);

return 0;
}

/* This structure is replicated for each GPIO block allocated at probe time */
static struct gpio_chip nmk_gpio_template = {
.direction_input = nmk_gpio_make_input,
Expand Down

0 comments on commit e8b18f3

Please sign in to comment.