linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] pinctrl:Intel: make the high level interrupt working
@ 2016-03-16 18:15 Qipeng Zha
  2016-03-16 18:15 ` [PATCH v2 2/2] pinctrl:Intel: implement gpio_irq_enable Qipeng Zha
  2016-03-17 13:34 ` [PATCH v2 1/2] pinctrl:Intel: make the high level interrupt working Linus Walleij
  0 siblings, 2 replies; 7+ messages in thread
From: Qipeng Zha @ 2016-03-16 18:15 UTC (permalink / raw)
  To: linux-gpio; +Cc: linus.walleij, mika.westerberg, Qi Zheng

High level trigger mode of GPIO interrupt is not set correctly
in intel_gpio_irq_type(), and will make this kind of interrupt
not respond.

Signed-off-by: Qi Zheng <qi.zheng@intel.com>
Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
---
 drivers/pinctrl/intel/pinctrl-intel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 85536b4..c216cb3 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -741,8 +741,9 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
 		value |= PADCFG0_RXINV;
 	} else if (type & IRQ_TYPE_EDGE_RISING) {
 		value |= PADCFG0_RXEVCFG_EDGE << PADCFG0_RXEVCFG_SHIFT;
-	} else if (type & IRQ_TYPE_LEVEL_LOW) {
-		value |= PADCFG0_RXINV;
+	} else if (type & IRQ_TYPE_LEVEL_MASK) {
+		if (type & IRQ_TYPE_LEVEL_LOW)
+			value |= PADCFG0_RXINV;
 	} else {
 		value |= PADCFG0_RXEVCFG_DISABLED << PADCFG0_RXEVCFG_SHIFT;
 	}
-- 
1.8.3.2


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

end of thread, other threads:[~2016-04-13 13:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 18:15 [PATCH v2 1/2] pinctrl:Intel: make the high level interrupt working Qipeng Zha
2016-03-16 18:15 ` [PATCH v2 2/2] pinctrl:Intel: implement gpio_irq_enable Qipeng Zha
2016-03-17 14:07   ` Linus Walleij
2016-04-01 11:54     ` Westerberg, Mika
2016-04-13 13:29       ` Linus Walleij
2016-04-13 13:54         ` Westerberg, Mika
2016-03-17 13:34 ` [PATCH v2 1/2] pinctrl:Intel: make the high level interrupt working 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).