linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: baytrail: show output gpio state correctly on Intel Baytrail
@ 2014-10-03 16:55 David Cohen
  2014-10-13 18:23 ` David Cohen
  0 siblings, 1 reply; 41+ messages in thread
From: David Cohen @ 2014-10-03 16:55 UTC (permalink / raw)
  To: linus.walleij; +Cc: linux-kernel, David Cohen

Even if a gpio pin is set to output, we still need to set INPUT_EN bit
to be able to read its value. Without this change, we'll always read low
level state.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
---
 drivers/pinctrl/pinctrl-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index e12e5b07f6d7..c23d8ded936d 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -318,7 +318,7 @@ static int byt_gpio_direction_output(struct gpio_chip *chip,
 		"Potential Error: Setting GPIO with direct_irq_en to output");
 
 	reg_val = readl(reg) | BYT_DIR_MASK;
-	reg_val &= ~BYT_OUTPUT_EN;
+	reg_val &= ~(BYT_OUTPUT_EN | BYT_INPUT_EN);
 
 	if (value)
 		writel(reg_val | BYT_LEVEL, reg);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2014-11-14 22:59 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-03 16:55 [PATCH] pinctrl: baytrail: show output gpio state correctly on Intel Baytrail David Cohen
2014-10-13 18:23 ` David Cohen
2014-10-13 19:14   ` Felipe Balbi
2014-10-13 19:24     ` David Cohen
2014-10-13 19:26       ` Felipe Balbi
2014-10-13 19:36         ` Felipe Balbi
2014-10-13 20:19           ` David Cohen
2014-10-28 10:15           ` Linus Walleij
2014-10-28 14:42             ` Felipe Balbi
2014-10-31  8:12               ` Linus Walleij
2014-10-31 13:20                 ` Felipe Balbi
2014-10-31 16:23                   ` David Cohen
2014-10-31 18:45                     ` David Cohen
2014-11-03  9:24                       ` Mika Westerberg
2014-11-03 15:00                         ` Felipe Balbi
2014-11-03 15:27                           ` Mika Westerberg
2014-11-03 15:35                             ` Felipe Balbi
2014-11-03 15:42                             ` Mika Westerberg
2014-11-03 15:50                               ` Felipe Balbi
2014-11-03 18:42                                 ` Mika Westerberg
2014-11-03 20:40                                   ` Felipe Balbi
2014-11-04  7:51                                     ` Mika Westerberg
2014-11-04 14:44                                       ` Felipe Balbi
2014-11-03 22:19                                   ` David Cohen
2014-11-04  7:59                                     ` Mika Westerberg
2014-11-04 18:05                                       ` David Cohen
2014-11-04 18:57                                         ` Mika Westerberg
2014-11-04 19:11                                           ` David Cohen
2014-11-04 19:34                                             ` Mika Westerberg
2014-11-04 21:51                                               ` David Cohen
2014-11-05  8:40                                                 ` Mika Westerberg
2014-11-14  9:40                                                 ` Linus Walleij
2014-11-14  9:39                                           ` Linus Walleij
2014-11-14  9:53                                             ` Mika Westerberg
2014-11-14 23:19                                               ` Rafael J. Wysocki
2014-11-14  9:30                                   ` Linus Walleij
2014-11-03 15:33                   ` Linus Walleij
2014-10-13 20:16         ` David Cohen
2014-10-14 17:54   ` [PATCH v2] " David Cohen
2014-10-14 18:19     ` Felipe Balbi
2014-10-28 10:17     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).