Re: [PATCH 6/6] gpio/omap: fix _set_gpio_irqenable implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tarun Kanti DebBarma <tarun.kanti@xxxxxx> writes:

> This function should be capable of both enabling and disabling interrupts
> based upon the *enable* parameter. Right now the function only enables
> the interrupt and *enable* is not used at all. So add the interrupt
> disable capability also using the parameter.
>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@xxxxxx>

Hmm, interesting.

This means that the IRQ mask/unmask stuff is not actually doing anything
since it's always leaving the IRQ enabled.  Curious that we haven't seen
side effects of that.  Maybe since the trigger type is none, the
interrupts won't fire.

In any case, this is a good fix.

Kevin


> ---
>  drivers/gpio/gpio-omap.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 67535c8..acc71a0 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -473,7 +473,10 @@ static void _disable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
>  
>  static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable)
>  {
> -	_enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
> +	if (enable)
> +		_enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
> +	else
> +		_disable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
>  }
>  
>  /*
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux