projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60f8339
)
gpio: tc3589x: fix up .get_direction()
author
Linus Walleij
<linus.walleij@linaro.org>
Mon, 14 Nov 2016 14:10:29 +0000
(15:10 +0100)
committer
Linus Walleij
<linus.walleij@linaro.org>
Tue, 15 Nov 2016 09:33:30 +0000
(10:33 +0100)
The bit in the TC3589x direction register is 0 for input
and 1 for output, but the gpiolib expects the reverse.
Fix up the logic.
Cc: stable@vger.kernel.org
Fixes:
14063d71e5e6
("gpio: tc3589x: add .get_direction() and small cleanup")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-tc3589x.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-tc3589x.c
b/drivers/gpio/gpio-tc3589x.c
index
5a5a6cb
..
d6e21f1
100644
(file)
--- a/
drivers/gpio/gpio-tc3589x.c
+++ b/
drivers/gpio/gpio-tc3589x.c
@@
-97,7
+97,7
@@
static int tc3589x_gpio_get_direction(struct gpio_chip *chip,
if (ret < 0)
return ret;
- return !
!
(ret & BIT(pos));
+ return !(ret & BIT(pos));
}
static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip,