From: Ong Boon Leong <[email protected]>

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.

This commit is only applicable for v3.8 GPIO driver and not after.
For v3.10 onwards, as of the date of this commit, the content of this
commit is making its way to upstream. So, please search for upstream commit
in drivers/pinctrl/pinctrl-baytrail.c in the future.

Signed-off-by: Ong Boon Leong <[email protected]>
---
 ...il-unmap-interrupt-when-free-the-gpio-pin.patch |   37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 
meta/cfg/kernel-cache/features/valleyisland-io/0022-gpio-baytrail-unmap-interrupt-when-free-the-gpio-pin.patch

diff --git 
a/meta/cfg/kernel-cache/features/valleyisland-io/0022-gpio-baytrail-unmap-interrupt-when-free-the-gpio-pin.patch
 
b/meta/cfg/kernel-cache/features/valleyisland-io/0022-gpio-baytrail-unmap-interrupt-when-free-the-gpio-pin.patch
new file mode 100644
index 0000000..2b3bf83
--- /dev/null
+++ 
b/meta/cfg/kernel-cache/features/valleyisland-io/0022-gpio-baytrail-unmap-interrupt-when-free-the-gpio-pin.patch
@@ -0,0 +1,37 @@
+From 100a1eaad2d4e4922e3508c999cf788cf5f491b9 Mon Sep 17 00:00:00 2001
+From: "Chew, Kean Ho" <[email protected]>
+Date: Wed, 12 Feb 2014 04:20:41 -0500
+Subject: [PATCH 3/5] gpio-baytrail: unmap interrupt when free the gpio pin
+
+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 <[email protected]>
+Signed-off-by: Chew, Chiau Ee <[email protected]>
+---
+ drivers/gpio/gpio-baytrail.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpio/gpio-baytrail.c b/drivers/gpio/gpio-baytrail.c
+index cf3aeee..f3fac33 100644
+--- a/drivers/gpio/gpio-baytrail.c
++++ b/drivers/gpio/gpio-baytrail.c
+@@ -179,11 +179,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.8.4.2
+
-- 
1.7.10.4

_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to