Thread (2 messages) 2 messages, 2 authors, 2010-06-24

[PATCH 2/6] gpio/stmpe-gpio: fix set direction input

From: Luotao Fu <hidden>
Date: 2010-06-24 11:14:18
Also in: lkml
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

to set an GPIO pin to input, the corresponding bit in GPDR needs to be cleared
instead of set. fixed with this patch.

Signed-off-by: Luotao Fu <redacted>
---
 drivers/gpio/stmpe-gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
index a4de271..4e1f1b9 100644
--- a/drivers/gpio/stmpe-gpio.c
+++ b/drivers/gpio/stmpe-gpio.c
@@ -88,7 +88,7 @@ static int stmpe_gpio_direction_input(struct gpio_chip *chip,
 	u8 reg = stmpe->regs[STMPE_IDX_GPDR_LSB] - (offset / 8);
 	u8 mask = 1 << (offset % 8);
 
-	return stmpe_set_bits(stmpe, reg, mask, mask);
+	return stmpe_set_bits(stmpe, reg, mask, 0);
 }
 
 static int stmpe_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help