From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: Linus Walleij <linus.walleij@linaro.org>
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: Mon, 29 May 2023 22:00:22 +0000 [thread overview]
Message-ID: <9756c9da-3063-04c8-02b6-79146b81b3cc@alliedtelesis.co.nz> (raw)
In-Reply-To: <CACRpkdbqq1=8SeN18V_iyFQQ00bd8Eia5okB1v3f=nZQOnSiTA@mail.gmail.com>
On 29/05/23 21:07, Linus Walleij wrote:
> On Wed, May 17, 2023 at 12:19 AM Chris Packham
> <Chris.Packham@alliedtelesis.co.nz> wrote:
>> On 17/05/23 01:57, Linus Walleij wrote:
>>> On Mon, May 15, 2023 at 12:27 AM Chris Packham
>>> <Chris.Packham@alliedtelesis.co.nz> wrote:
>>>> 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.
>> That's not really a feasible solution. I'm dealing with application code
>> that has been happily using the sysfs interface for many years.
> I wonder how many years.
>
> The GPIO sysfs has been deprecated for seven years:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/Documentation/ABI/obsolete/sysfs-gpio?id=fe95046e960b4b76e73dc1486955d93f47276134
>
> My fear is that deprecation is ignored and people still develop stuff
> like this ignoring the fact that the ABI is deprecated.
I can't claim that the code is earlier than that deprecation (maybe
2.6.32 era) but we certainly didn't know about the deprecation when we
started using it. Unfortunately the internet has a long memory so if you
search for Linux GPIOs you'll find plenty of examples that point to the
sysfs ABI as the way that it's done.
Switching to the libgpiod is viable for a few miscellaneous uses (I'll
try to push that from my end), there probably will be a long tail of
code that will continue to use the sysfs ABI.
>
> Yours,
> Linus Walleij
prev parent reply other threads:[~2023-05-29 22:00 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
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 [this message]
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=9756c9da-3063-04c8-02b6-79146b81b3cc@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=Ben.Brown@alliedtelesis.co.nz \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=johan@kernel.org \
--cc=linus.walleij@linaro.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.