All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus Mayer" <mmayer@broadcom.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, Alexandre Courbot <acourbot@nvidia.com>
Subject: Re: [PATCH v2] gpio: bcm-kona: only use set_irq_flags() on ARM
Date: Fri, 20 Sep 2013 14:26:32 -0700	[thread overview]
Message-ID: <523CBD88.30805@broadcom.com> (raw)
In-Reply-To: <1379711978-10973-1-git-send-email-linus.walleij@linaro.org>

On 13-09-20 02:19 PM, Linus Walleij wrote:
> As per the pattern from other GPIO drivers, use set_irq_flags()
> on ARM only, use irq_set_noprobe() on other archs.
>
> Also rename the argument "virq" to just "irq", this IRQ isn't
> any more "virtual" than any other Linux IRQ number, we use
> "hwirq" for the actual hw-numbers, "virq" is just bogus.
>
> Cc: Markus Mayer <mmayer@broadcom.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Forgot a second place the code was using set_irq_flags()...
> ---
>   drivers/gpio/gpio-bcm-kona.c | 20 ++++++++++++++------
>   1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index f7d932a..c0751a8 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -468,18 +468,22 @@ MODULE_DEVICE_TABLE(of, bcm_kona_gpio_of_match);
>    */
>   static struct lock_class_key gpio_lock_class;
>
> -static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int virq,
> +static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq,
>   				 irq_hw_number_t hwirq)
>   {
>   	int ret;
>
> -	ret = irq_set_chip_data(virq, d->host_data);
> +	ret = irq_set_chip_data(irq, d->host_data);
>   	if (ret < 0)
>   		return ret;
> -	irq_set_lockdep_class(virq, &gpio_lock_class);
> -	irq_set_chip_and_handler(virq, &bcm_gpio_irq_chip, handle_simple_irq);
> -	irq_set_nested_thread(virq, 1);
> -	set_irq_flags(virq, IRQF_VALID);
> +	irq_set_lockdep_class(irq, &gpio_lock_class);
> +	irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip, handle_simple_irq);
> +	irq_set_nested_thread(irq, 1);
> +#ifdef CONFIG_ARM
> +	set_irq_flags(irq, IRQF_VALID);
> +#else
> +	irq_set_noprobe(irq);
> +#endif
>
>   	return 0;
>   }
> @@ -598,7 +602,11 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
>   		irq_set_lockdep_class(irq, &gpio_lock_class);
>   		irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip,
>   					 handle_simple_irq);
> +#ifdef CONFIG_ARM
>   		set_irq_flags(irq, IRQF_VALID);
> +#else
> +		irq_set_noprobe(irq);
> +#endif
>   	}
>   	for (i = 0; i < kona_gpio->num_bank; i++) {
>   		bank = &kona_gpio->banks[i];
>

Thanks for the fix.

Reviewed-by: Markus Mayer <mmayer@broadcom.com>




      reply	other threads:[~2013-09-20 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 21:19 [PATCH v2] gpio: bcm-kona: only use set_irq_flags() on ARM Linus Walleij
2013-09-20 21:26 ` Markus Mayer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523CBD88.30805@broadcom.com \
    --to=mmayer@broadcom.com \
    --cc=acourbot@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.