Message ID | 1476774988-13484-1-git-send-email-patrice.chotard@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10/18/2016 09:16 AM, patrice.chotard@st.com wrote: > From: Patrice Chotard <patrice.chotard@st.com> > > Thanks to 332e99d5ae4 which now alerts of default > trigger usage when configuring interrupts. > > Signed-off-by: Patrice Chotard <patrice.chotard@st.com> > --- > drivers/pinctrl/pinctrl-st.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c > index 99da4cf..b7bb371 100644 > --- a/drivers/pinctrl/pinctrl-st.c > +++ b/drivers/pinctrl/pinctrl-st.c > @@ -1512,7 +1512,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info, > if (info->irqmux_base || gpio_irq > 0) { > err = gpiochip_irqchip_add(&bank->gpio_chip, &st_gpio_irqchip, > 0, handle_simple_irq, > - IRQ_TYPE_LEVEL_LOW); > + IRQ_TYPE_NONE); > if (err) { > gpiochip_remove(&bank->gpio_chip); > dev_info(dev, "could not add irqchip\n"); > Hi Linus I forgot to mention that this patch is dedicated for v4.9-rcs Thanks Patrice
Hi Patrice, On Thu, 20 Oct 2016, Patrice Chotard wrote: > > > On 10/18/2016 09:16 AM, patrice.chotard@st.com wrote: > > From: Patrice Chotard <patrice.chotard@st.com> > > > > Thanks to 332e99d5ae4 which now alerts of default > > trigger usage when configuring interrupts. > > > > Signed-off-by: Patrice Chotard <patrice.chotard@st.com> > > --- > > drivers/pinctrl/pinctrl-st.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c > > index 99da4cf..b7bb371 100644 > > --- a/drivers/pinctrl/pinctrl-st.c > > +++ b/drivers/pinctrl/pinctrl-st.c > > @@ -1512,7 +1512,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info, > > if (info->irqmux_base || gpio_irq > 0) { > > err = gpiochip_irqchip_add(&bank->gpio_chip, &st_gpio_irqchip, > > 0, handle_simple_irq, > > - IRQ_TYPE_LEVEL_LOW); > > + IRQ_TYPE_NONE); > > if (err) { > > gpiochip_remove(&bank->gpio_chip); > > dev_info(dev, "could not add irqchip\n"); > > > > Hi Linus > > I forgot to mention that this patch is dedicated for v4.9-rcs Wow, v4.9-rc is a noisy boot without this patch :) Acked-by: Peter Griffin <peter.griffin@linaro.org>
On Tue, Oct 18, 2016 at 9:16 AM, <patrice.chotard@st.com> wrote: > From: Patrice Chotard <patrice.chotard@st.com> > > Thanks to 332e99d5ae4 which now alerts of default > trigger usage when configuring interrupts. > > Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Patch applied with Peter's ACK. Pls also look into the following: __gpio_irq_handler seems to be doing some stuff per-IRQ that only pertains to edge-triggered IRQs. Normally that should be handled by: - Setting default handler to handle_bad_irq() - Setting handler to handle_edge_irq() or handle_level_irq() in .set_type() - Implement .irq_ack() on the irqchip and handle the edge-specific ACKing there. See for example drivers/gpio/gpio-pl061.c. I am not *sure* this applies to pinctrl-st.c but please check if it provides more elegant code. Notmally the .irq_ack() is for edge detection hardware that allows ACKing the ege IRQ in a separate register and after that we can raise another edge IRQ while the current IRQ is being handled. Yours, Linus Walleij
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 99da4cf..b7bb371 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -1512,7 +1512,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info, if (info->irqmux_base || gpio_irq > 0) { err = gpiochip_irqchip_add(&bank->gpio_chip, &st_gpio_irqchip, 0, handle_simple_irq, - IRQ_TYPE_LEVEL_LOW); + IRQ_TYPE_NONE); if (err) { gpiochip_remove(&bank->gpio_chip); dev_info(dev, "could not add irqchip\n");