[linux-yocto] [PATCH 26/29] pinctrl-baytrail: unmap interrupt when free the gpio pin

Kamble, Nitin A nitin.a.kamble at intel.com
Wed Apr 9 17:34:51 PDT 2014


On 4/7/2014 8:18 AM, rebecca.swee.fun.chang at intel.com wrote:
> 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
typo: unamp/unmap

> 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 c0ef8e2..554e279 100644
> --- a/drivers/pinctrl/pinctrl-baytrail.c
> +++ b/drivers/pinctrl/pinctrl-baytrail.c
> @@ -177,11 +177,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);
>   }



More information about the linux-yocto mailing list