All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: st: don't specify default interrupt trigger
@ 2016-10-18  7:16 ` patrice.chotard at st.com
  0 siblings, 0 replies; 8+ messages in thread
From: patrice.chotard @ 2016-10-18  7:16 UTC (permalink / raw)
  To: linux-kernel, Linus Walleij, linux-arm-kernel
  Cc: kernel, patrice.chotard, peter.griffin, lee.jones

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");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] pinctrl: st: don't specify default interrupt trigger
@ 2016-10-18  7:16 ` patrice.chotard at st.com
  0 siblings, 0 replies; 8+ messages in thread
From: patrice.chotard at st.com @ 2016-10-18  7:16 UTC (permalink / raw)
  To: linux-arm-kernel

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");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] pinctrl: st: don't specify default interrupt trigger
  2016-10-18  7:16 ` patrice.chotard at st.com
@ 2016-10-20 11:35   ` Patrice Chotard
  -1 siblings, 0 replies; 8+ messages in thread
From: Patrice Chotard @ 2016-10-20 11:35 UTC (permalink / raw)
  To: linux-kernel, Linus Walleij, linux-arm-kernel
  Cc: kernel, peter.griffin, lee.jones



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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] pinctrl: st: don't specify default interrupt trigger
@ 2016-10-20 11:35   ` Patrice Chotard
  0 siblings, 0 replies; 8+ messages in thread
From: Patrice Chotard @ 2016-10-20 11:35 UTC (permalink / raw)
  To: linux-arm-kernel



On 10/18/2016 09:16 AM, patrice.chotard at 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pinctrl: st: don't specify default interrupt trigger
  2016-10-20 11:35   ` Patrice Chotard
@ 2016-10-20 11:56     ` Peter Griffin
  -1 siblings, 0 replies; 8+ messages in thread
From: Peter Griffin @ 2016-10-20 11:56 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: linux-kernel, Linus Walleij, linux-arm-kernel, kernel, lee.jones

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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] pinctrl: st: don't specify default interrupt trigger
@ 2016-10-20 11:56     ` Peter Griffin
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Griffin @ 2016-10-20 11:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Patrice,

On Thu, 20 Oct 2016, Patrice Chotard wrote:

> 
> 
> On 10/18/2016 09:16 AM, patrice.chotard at 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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pinctrl: st: don't specify default interrupt trigger
  2016-10-18  7:16 ` patrice.chotard at st.com
@ 2016-10-23 23:30   ` Linus Walleij
  -1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2016-10-23 23:30 UTC (permalink / raw)
  To: Patrice CHOTARD
  Cc: linux-kernel, linux-arm-kernel, open list:ARM/STI ARCHITECTURE,
	Peter Griffin, Lee Jones

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] pinctrl: st: don't specify default interrupt trigger
@ 2016-10-23 23:30   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2016-10-23 23:30 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-23 23:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  7:16 [PATCH] pinctrl: st: don't specify default interrupt trigger patrice.chotard
2016-10-18  7:16 ` patrice.chotard at st.com
2016-10-20 11:35 ` Patrice Chotard
2016-10-20 11:35   ` Patrice Chotard
2016-10-20 11:56   ` Peter Griffin
2016-10-20 11:56     ` Peter Griffin
2016-10-23 23:30 ` Linus Walleij
2016-10-23 23:30   ` Linus Walleij

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.