All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: "brgl@bgdev.pl" <brgl@bgdev.pl>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>
Subject: Re: [PATCH] gpio: Do not trigger WARN() with sysfs gpio export/unexport
Date: Wed, 11 Nov 2020 07:11:37 +0000	[thread overview]
Message-ID: <e7d673e29a2a4ddebd4b948eb60bf7b9ba97c6a2.camel@wdc.com> (raw)
In-Reply-To: <CAMRc=MfjWfvKP8ZjU9RA+kgpR9x3pqkGExzMjSerLztLwDV86Q@mail.gmail.com>

On Tue, 2020-11-10 at 15:40 +0100, Bartosz Golaszewski wrote:
> On Tue, Nov 10, 2020 at 3:31 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > 
> > On Fri, Nov 6, 2020 at 12:27 PM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> > 
> > > It may not be the best interface for regular end users to
> > > manipulate gpios, but it is definitely super useful for developers to do quick
> > > tests of their setup/drivers (which is what I did for my work with the Kendryte
> > > K210 RISC-V SoC support).
> > 
> > It is a bit discouraging that RISC-V, which was invented after we already
> > obsoleted the sysfs ABI, is deploying this for development and test.
> > 
> > We need to think about a similar facility for users which is less
> > damaging but fulfils the same needs. I think I saw something a while
> > back that looked promising and added some funky files in debugfs
> > in a hierarchical manner per-gpiochip instead. That is how debugfs
> > should be used.
> > 
> 
> Basically something like what gpio-mockup does for events? Was it
> something out-of-tree or was it on the mailing list?
> 
> Also: quick tests have the tendency to become long-term solutions. :)
> 
> Is gpioget/gpioset duo difficult/cumbersome to use? It's a serious
> question - I wrote it in a way that was as user-friendly as possible
> but maybe I'm missing something about sysfs that makes users prefer it
> over a command-line tool. To me sysfs was always a PITA with the
> global numbers etc. but it still seems to stick with others.

In my particular case, I am using a simple busybox userspace that has nothing
else but a shell, so I did not have the gpioget/gpioset tools. And to be frank,
I did not even know what tool to use to control GPIOs. It is the first time I
am touching GPIOs with Linux and did not spent time to study what should be
used once I saw that sysfs allowed controlling the pins for tests.

Removing sysfs entirely would likely force people to look for these tools to do
tests, and I really am an example here :)

I am using buildroot to generate the toolchain and busybox userspace for the
board.  I now see that libgpiod and gpio tools packages are in there but for
whatever reasons, I cannot select them for my RISC-V build. Will need to
explore why.


-- 
Damien Le Moal
Western Digital

  parent reply	other threads:[~2020-11-11  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 11:53 [PATCH] gpio: Do not trigger WARN() with sysfs gpio export/unexport Damien Le Moal
2020-11-06  9:27 ` Bartosz Golaszewski
2020-11-06 11:27   ` Damien Le Moal
2020-11-10 14:31     ` Linus Walleij
2020-11-10 14:40       ` Bartosz Golaszewski
2020-11-10 15:09         ` Michael Walle
2020-11-11  7:14           ` Damien Le Moal
2020-11-11  7:20           ` Damien Le Moal
2020-11-11  7:11         ` Damien Le Moal [this message]
2020-11-11  6:54       ` Damien Le Moal
2020-11-11 15:14         ` Linus Walleij
2020-11-19 18:50           ` Geert Uytterhoeven
2020-11-10 14:22   ` Linus Walleij

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=e7d673e29a2a4ddebd4b948eb60bf7b9ba97c6a2.camel@wdc.com \
    --to=damien.lemoal@wdc.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.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.