Messages in this thread | | | From | Linus Walleij <> | Date | Tue, 16 May 2023 15:57:57 +0200 | Subject | Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible() |
| |
On Mon, May 15, 2023 at 12:27 AM Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> In my original case which is a kernel module that exports a GPIO for > userspace using gpiod_export()
We should not add new users for that API as it increase the usage of the sysfs ABI but if it's an existing in-tree usecase I buy it.
> The crux of the problem is that the irq_desc is created when it hasn't > been requested.
The right solution to me seems to be to not use gpiod_export() and not use sysfs TBH.
> In some cases we know the GPIO pin is an output so we > could avoid it, in others we could delay the creation until an interrupt > is actually requested (which is what I'm attempting to do).
Yeah I guess. If we wanna keep papering over issues created by the sysfs ABI.
Yours, Linus Walleij
| |