From: Linus Walleij <linus.walleij@linaro.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: "brgl@bgdev.pl" <brgl@bgdev.pl>,
"johan@kernel.org" <johan@kernel.org>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"maz@kernel.org" <maz@kernel.org>,
Ben Brown <Ben.Brown@alliedtelesis.co.nz>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()
Date: Tue, 16 May 2023 15:57:57 +0200 [thread overview]
Message-ID: <CACRpkdbiSAFoJP_JB1d_6gQ+Xx7Y+mLAh=C6Za+fpyWuRe6Gbw@mail.gmail.com> (raw)
In-Reply-To: <b36fcdf1-45ab-0c06-efe4-237df0612466@alliedtelesis.co.nz>
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
next prev parent reply other threads:[~2023-05-16 13:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 4:28 [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Chris Packham
2023-05-12 7:24 ` Johan Hovold
2023-05-14 21:57 ` Chris Packham
2023-05-15 6:43 ` andy.shevchenko
2023-05-15 21:01 ` Chris Packham
2023-05-12 7:56 ` Linus Walleij
2023-05-14 22:27 ` Chris Packham
2023-05-16 13:57 ` Linus Walleij [this message]
2023-05-16 22:19 ` Chris Packham
2023-05-16 22:47 ` Kent Gibson
2023-05-16 23:50 ` Chris Packham
2023-05-17 0:47 ` Kent Gibson
2023-05-17 1:05 ` Kent Gibson
2023-05-17 1:07 ` Chris Packham
2023-05-17 1:21 ` Kent Gibson
2023-05-17 8:54 ` Andy Shevchenko
2023-05-17 9:10 ` Kent Gibson
2023-05-17 21:30 ` Chris Packham
2023-05-23 16:38 ` andy.shevchenko
2023-05-23 21:17 ` Chris Packham
2023-05-24 5:41 ` Kent Gibson
2023-05-24 23:53 ` using libgpiod to replace sysfs ABI (was Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()) Chris Packham
2023-05-25 1:19 ` Kent Gibson
2023-05-25 9:13 ` Andy Shevchenko
2023-05-25 14:35 ` Bartosz Golaszewski
2023-05-26 12:46 ` [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Bartosz Golaszewski
2023-05-28 21:04 ` Chris Packham
2023-05-29 9:19 ` Linus Walleij
2023-05-29 15:07 ` Andrew Lunn
2023-05-29 9:07 ` Linus Walleij
2023-05-29 22:00 ` Chris Packham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACRpkdbiSAFoJP_JB1d_6gQ+Xx7Y+mLAh=C6Za+fpyWuRe6Gbw@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=Ben.Brown@alliedtelesis.co.nz \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=johan@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.