[linux-yocto] [PATCHv2 4/6] pinctrl-baytrail: unmap interrupt when free the gpio pin
rebecca.swee.fun.chang at intel.com
rebecca.swee.fun.chang at intel.com
Fri Aug 29 02:29:53 PDT 2014
From: "Chew, Kean Ho" <kean.ho.chew at intel.com>
In to_irq() callback, we create the hwirq to linux irq
mapping for the requested GPIO pin. Hence, we unamp
the mapping when the gpio pin is being released.
Signed-off-by: Chew, Kean Ho <kean.ho.chew at intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew at intel.com>
Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj at intel.com>
---
drivers/pinctrl/pinctrl-baytrail.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index ea17f0d..5dee6d7 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -196,11 +196,14 @@ static void byt_gpio_free(struct gpio_chip *chip, unsigned offset)
struct byt_gpio *vg = to_byt_gpio(chip);
void __iomem *reg = byt_gpio_reg(&vg->chip, offset, BYT_CONF0_REG);
u32 value;
+ unsigned int virq;
/* clear interrupt triggering */
value = readl(reg);
value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
writel(value, reg);
+ virq = irq_find_mapping(vg->domain, offset);
+ irq_dispose_mapping(virq);
pm_runtime_put(&vg->pdev->dev);
}
--
1.9.1
More information about the linux-yocto
mailing list