Re: [PATCH] gpiolib: Don't implicitly disable irq when masking

From: Linus Walleij
Date: Thu May 11 2023 - 16:49:09 EST

On Thu, May 11, 2023 at 10:36 PM Chris Packham
<Chris.Packham@xxxxxxxxxxxxxxxxxxx> wrote:

> I spent yesterday trying to demonstrate the
> problem on a newer kernel. Some teething issues aside I can trigger the
> warning if I have a gpio-button using one of the pca9555 pins as an
> interrupt and then I export some of the other pins via sysfs.
> Interestingly the warning isn't triggered if I use a gpio-hog instead of
> exporting the pins.

What happens if you use the gpio character device instead of sysfs?

Like for example with the tools in tools/gpio or using libgpiod
example tools?

> I haven't figured out why that is but I'm assuming
> it's something to do with the hogged pins being excluded from the irq
> domain before it is registered.

If you write something to the "edge" file I can easily see things
going sidewise. The sysfs is really not a nice tool, which is why
it is deprecated.

Linus Walleij