Re: [PATCH] gpio: Revert regression in sysfs-gpio (gpiolib.c)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 12, 2022 at 1:55 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> On Fri, Feb 11, 2022 at 11:36 PM Marcelo Roberto Jimenez
> <marcelo.jimenez@xxxxxxxxx> wrote:
>
> > > Which devicetree or boardfile in the upstream Linux kernel is this system
> > > using?
> >
> > arch/arm/boot/dts/at91-ariettag25.dts
>
> So this system was added in 2015 which is the same year that
> we marked the GPIO sysfs ABI obsolete:
>
> commit fe95046e960b4b76e73dc1486955d93f47276134
> Author: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Date:   Thu Oct 22 09:58:34 2015 +0200
>
>     gpio: ABI: mark the sysfs ABI as obsolete
>
> Why is this system which was clearly developed while we deprecated
> the sysfs ABI so dependent on it?

The date when the device tree file was committed upstream is not the
same date when the product has been released. The product was
originally released in about January, 2014, as can be seen, e.g, from
a post here from January 30, 2014:
https://www.open-electronics.org/acme-system-launched-arietta-g25-a-new-micro-linux-board/
This is almost two years before the API has been marked obsolete.

The company that produces the board (which I am not affiliated to)
gave their users access to a different device tree file.

> I am curious about the usecases and how deeply you have built
> yourselves into this.

I don't know if I understand what you mean, sorry.

> > In any case, the upstream file should be enough to test the issue reported here.
>
> The thing is that upstream isn't super happy that you have been
> making yourselves dependent on features that we are actively
> discouraging and then demanding that we support these features.

Hum, demanding seems to be a strong word for what I am doing here.

Deprecated should not mean broken. My point is: the API seems to be
currently broken. User space apps got broken, that's a fact. I even
took the time to bisect the kernel and show you which commit broke it.
So, no, I am not demanding. More like reporting and providing a
temporary solution to those with a similar problem.

Maybe it is time to remove the API, but this is up to "upstream".
Leaving the API broken seems pointless and unproductive.

Sorry for the "not super happiness of upstream", but maybe upstream
got me wrong.

We are not "making ourselves dependent on features ...". The API was
there. We used it. Now it is deprecated, ok, we should move on. I got
the message.

> Anyway, what is wrong with using the GPIO character device and libgpiod
> on this system? What kind of userspace are you creating that
> absolutely requires that you use sysfs?

There is nothing wrong, except for a matter of causality that seems to
have been inverted here and has been explained above.

> I hope not one of these?
> https://docs.kernel.org/driver-api/gpio/drivers-on-gpio.html
>
> Here is some info about what we have been doing with the GPIO
> character device:
>
> https://docs.kernel.org/driver-api/gpio/using-gpio.html
> https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/
>
> Here is Bartosz presenting it:
> https://www.youtube.com/watch?v=BK6gOLVRKuU

Please, don't get me wrong. I find the work done in GPIO amazing.

Thanks for all the valuable information, I sincerely appreciate it and
will read it all carefully.

And I will also tell the dev team that they must use the GPIO char dev
and libgpiod from now on and must port everything to it. And we will
likely have another group of people who are not super happy, but
that's life... :)

> Since I patched the kernel such that you cannot activate the sysfs
> ABI without also activating the character device I *know* that you
> have it on your system.

Smart move!

> Yours,
> Linus Walleij

Best regards,
Marcelo.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux