Re: [PATCH 3/3] gpio: sprd: Add clear interrupt

wenhua lin
2023-08-10T07:08:50Z

On Wed, Aug 9, 2023 at 9:31 AM Baolin Wang
<baolin.wang@linux.alibaba.com> wrote:
>
>
>
> On 8/8/2023 11:31 AM, Wenhua Lin wrote:
> > Clear interrupt after set the interrupt type.
>
> Sorry, NAK. The commit message is meaningless.

Hi baolin:
We will re-modify the commit message and submit it in patch v2.

Thanks
Wenhua.Lin

>
> > Signed-off-by: Wenhua Lin <Wenhua.Lin@unisoc.com>
> > ---
> > drivers/gpio/gpio-eic-sprd.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
> > index c506cfd6df8e..31125f53bc97 100644
> > --- a/drivers/gpio/gpio-eic-sprd.c
> > +++ b/drivers/gpio/gpio-eic-sprd.c
> > @@ -374,29 +374,34 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_EDGE_FALLING:
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 0);
> > + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_EDGE_BOTH:
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_LEVEL_HIGH:
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 1);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_level_irq);
> > break;
> > case IRQ_TYPE_LEVEL_LOW:
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 1);
> > sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 0);
> > + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_level_irq);
> > break;
> > default:
> > @@ -409,29 +414,34 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_EDGE_FALLING:
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 0);
> > + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_EDGE_BOTH:
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_edge_irq);
> > break;
> > case IRQ_TYPE_LEVEL_HIGH:
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 1);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 1);
> > + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_level_irq);
> > break;
> > case IRQ_TYPE_LEVEL_LOW:
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 1);
> > sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 0);
> > + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1);
> > irq_set_handler_locked(data, handle_level_irq);
> > break;