Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186342
b: refs/heads/master
c: a8a5164
h: refs/heads/master
v: v3
  • Loading branch information
Ben Gardner authored and Linus Torvalds committed Mar 6, 2010
1 parent a3e0f03 commit 672a182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 89ea8bbe9c3eb2ea0cb57a4ecf283cab7326f0b0
refs/heads/master: a8a5164c297c16c2f4be776714ca47dba252cc3d
4 changes: 3 additions & 1 deletion trunk/drivers/gpio/cs5535-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static int chip_gpio_request(struct gpio_chip *c, unsigned offset)

static int chip_gpio_get(struct gpio_chip *chip, unsigned offset)
{
return cs5535_gpio_isset(offset, GPIO_OUTPUT_VAL);
return cs5535_gpio_isset(offset, GPIO_READ_BACK);
}

static void chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
Expand All @@ -172,6 +172,7 @@ static int chip_direction_input(struct gpio_chip *c, unsigned offset)

spin_lock_irqsave(&chip->lock, flags);
__cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
__cs5535_gpio_clear(chip, offset, GPIO_OUTPUT_ENABLE);
spin_unlock_irqrestore(&chip->lock, flags);

return 0;
Expand All @@ -184,6 +185,7 @@ static int chip_direction_output(struct gpio_chip *c, unsigned offset, int val)

spin_lock_irqsave(&chip->lock, flags);

__cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
__cs5535_gpio_set(chip, offset, GPIO_OUTPUT_ENABLE);
if (val)
__cs5535_gpio_set(chip, offset, GPIO_OUTPUT_VAL);
Expand Down

0 comments on commit 672a182

Please sign in to comment.