[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9756c9da-3063-04c8-02b6-79146b81b3cc@alliedtelesis.co.nz>
Date: Mon, 29 May 2023 22:00:22 +0000
From: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To: Linus Walleij <linus.walleij@...aro.org>
CC: "brgl@...ev.pl" <brgl@...ev.pl>,
"johan@...nel.org" <johan@...nel.org>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"maz@...nel.org" <maz@...nel.org>,
Ben Brown <Ben.Brown@...iedtelesis.co.nz>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()
On 29/05/23 21:07, Linus Walleij wrote:
> On Wed, May 17, 2023 at 12:19 AM Chris Packham
> <Chris.Packham@...iedtelesis.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@...iedtelesis.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
Powered by blists - more mailing lists