stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: stable <stable@vger.kernel.org>,
	regressions@lists.linux.dev, Bartosz Golaszewski <brgl@bgdev.pl>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Thierry Reding <treding@nvidia.com>,
	Vidya Sagar <vidyas@nvidia.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Edmond Chung <edmondchung@google.com>,
	Andrew Chant <achant@google.com>,
	Will McVicker <willmcvicker@google.com>,
	Sergio Tanzilli <tanzilli@acmesystems.it>
Subject: Re: [PATCH] gpio: Revert regression in sysfs-gpio (gpiolib.c)
Date: Sun, 13 Feb 2022 20:23:47 -0300	[thread overview]
Message-ID: <CACjc_5r7i3HJ466MtwR0iZD6jdVXEqq4km0Tn7XwRijGnsDz=Q@mail.gmail.com> (raw)
In-Reply-To: <CACRpkda=0=Hcyyote+AfwoLKPGak7RV6VFt6b0fMVWBe8veTwA@mail.gmail.com>

On Sat, Feb 12, 2022 at 1:55 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Feb 11, 2022 at 11:36 PM Marcelo Roberto Jimenez
> <marcelo.jimenez@gmail.com> 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@linaro.org>
> 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.

  reply	other threads:[~2022-02-13 23:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 15:35 Marcelo Roberto Jimenez
2021-12-18  6:28 ` Thorsten Leemhuis
2021-12-20 14:57   ` Bartosz Golaszewski
2021-12-20 15:14     ` Geert Uytterhoeven
2021-12-20 19:24       ` Will McVicker
2021-12-20 20:41         ` Marcelo Roberto Jimenez
2021-12-20 20:41       ` Marcelo Roberto Jimenez
2021-12-20 20:41     ` Marcelo Roberto Jimenez
2022-01-10  7:02       ` Thorsten Leemhuis
2022-01-12  0:09         ` Marcelo Roberto Jimenez
2022-02-08 12:24           ` Thorsten Leemhuis
2022-02-17 19:11           ` Thierry Reding
2022-02-11  0:02 ` Linus Walleij
2022-02-11 22:36   ` Marcelo Roberto Jimenez
2022-02-12 16:54     ` Linus Walleij
2022-02-13 23:23       ` Marcelo Roberto Jimenez [this message]
2022-02-15 21:56         ` Linus Walleij
2022-02-16 14:40           ` Bartosz Golaszewski
2022-03-04  7:13             ` Thorsten Leemhuis
2022-03-07  9:58               ` Bartosz Golaszewski
2022-03-07 10:12                 ` Thorsten Leemhuis
2022-05-20  9:12             ` Thorsten Leemhuis
2022-05-20 17:28               ` Marcelo Roberto Jimenez
2022-03-14 15:55 ` Michael Walle
2022-03-15 15:32   ` Bartosz Golaszewski
2022-03-15 15:45     ` Michael Walle
2022-03-17  8:37       ` Andy Shevchenko
2022-03-17  8:48         ` Michael Walle

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='CACjc_5r7i3HJ466MtwR0iZD6jdVXEqq4km0Tn7XwRijGnsDz=Q@mail.gmail.com' \
    --to=marcelo.jimenez@gmail.com \
    --cc=achant@google.com \
    --cc=brgl@bgdev.pl \
    --cc=edmondchung@google.com \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=sfr@canb.auug.org.au \
    --cc=stable@vger.kernel.org \
    --cc=tanzilli@acmesystems.it \
    --cc=treding@nvidia.com \
    --cc=vidyas@nvidia.com \
    --cc=willmcvicker@google.com \
    --subject='Re: [PATCH] gpio: Revert regression in sysfs-gpio (gpiolib.c)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).