All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Phil Reid <preid@electromag.com.au>
Cc: thloh@altera.com, Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high
Date: Fri, 17 Feb 2017 11:23:45 +0200	[thread overview]
Message-ID: <CAHp75VdK2sL1WyjfcRzQZ4Q+i5mnbcsYA4jPJhx=-g-e03KOog@mail.gmail.com> (raw)
In-Reply-To: <1487322752-31896-1-git-send-email-preid@electromag.com.au>

On Fri, Feb 17, 2017 at 11:12 AM, Phil Reid <preid@electromag.com.au> wrote:
> When a threaded irq handler is chained attached to one of the gpio
> pins when configure for level irq the altera_gpio_irq_leveL_high_handler
> does not mask the interrupt while being handled by the chained irq.
> This resulting in the threaded irq not getting enough cycles to complete
> quickly enough before the irq was disabled as faulty.
> It looks like handle_level_irq should be used in this situation
> instead of handle_simple_irq.

> @@ -310,7 +310,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
>         altera_gc->interrupt_trigger = reg;
>
>         ret = gpiochip_irqchip_add(&altera_gc->mmchip.gc, &altera_irq_chip, 0,
> -               handle_simple_irq, IRQ_TYPE_NONE);
> +               altera_gc->interrupt_trigger == IRQ_TYPE_LEVEL_HIGH ?
> +               handle_level_irq : handle_simple_irq, IRQ_TYPE_NONE);

AFAIK, handle_bad_irq() should be used here.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2017-02-17  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  9:12 [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Phil Reid
2017-02-17  9:23 ` Andy Shevchenko [this message]
2017-02-17 11:32   ` Phil Reid
2017-02-17 11:40     ` Andy Shevchenko
2017-02-23 14:52 ` Linus Walleij

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='CAHp75VdK2sL1WyjfcRzQZ4Q+i5mnbcsYA4jPJhx=-g-e03KOog@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=thloh@altera.com \
    /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.