]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pinctrl: intel: make the high level interrupt working
authorQipeng Zha <qipeng.zha@intel.com>
Wed, 16 Mar 2016 18:15:25 +0000 (02:15 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 30 Mar 2016 08:57:52 +0000 (10:57 +0200)
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>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-intel.c

index 85536b467c25b50f43e19171996e009352ccb682..c216cb3bef2f86729163fae772e981dd1deb60da 100644 (file)
@@ -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;
        }