lkml.org 
[lkml]   [2020]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 1/3] gpio: gpio-hisi: Add HiSilicon GPIO support
Hi Jiaxing,

thanks! waiting for the new patch!

On Wed, Dec 9, 2020 at 9:19 AM luojiaxing <luojiaxing@huawei.com> wrote:

> >> +static void hisi_gpio_irq_disable(struct irq_data *d)
> >> +{
> >> + struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
> >> +
> >> + hisi_gpio_irq_set_mask(d);
> >> + hisi_gpio_write_reg(chip, HISI_GPIO_INTEN_CLR_WX, BIT(irqd_to_hwirq(d)));
> >> +}
> >
> > Interesting with a GPIO hardware that both as enable and mask
> > bits. I can't see why, usually they just have masks but I suppose
> > there is some reason.
>
> I see gpio-dwapb.c distinguishes between enable and mask too.
>
> In my opinion, enable indicates that the user uses the GPIO line as the
> interrupt trigger source,
>
> and mask indicates that the user does not want to see an interrupts for
> a while.
>
> The difference between the two types of flag is that interrupts
> generated during masking are recorded but not lost,
>
> however, if interrupts are disabled, interrupts will lost.

Ah, that makes perfect sense! Thanks for explaining.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2020-12-09 10:09    [W:0.112 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site