All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"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: Thu, 19 Nov 2020 19:50:41 +0100	[thread overview]
Message-ID: <CAMuHMdXuz-cvpE7LD=4Bd+pm4qSJVGDzaT1e9M-bgO-bZ7NpPw@mail.gmail.com> (raw)
In-Reply-To: <CACRpkda_4JrF=akOO+Y8=xcDqQ3710ztbcj+Z2PPk65nz37Vag@mail.gmail.com>

Hi Linus,

On Wed, Nov 11, 2020 at 4:16 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Nov 11, 2020 at 7:54 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> > > 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.
> >
> > I like this idea too. The point is (my opinion only), anything that allows
> > quick testing using only a shell without any extra tooling needed is fine.
> > Extra tooling is not really an issue when using a full distro, but it can be a
> > problem when working with things like buildroot (or busybox directly). And
> > indeed, as its name implies, debugfs seems like a good alternative to sysfs.
>
> I would say the problem is something like, I want to test some simple
> GPIO access like turning a LED on/off and recompiling the rootfs
> is a pain, so some simple debugfs facility would be nice to have to test
> it and get on with development.
>
> OK I'll think of some TODO item.

I'm fully aware of the existence of libgpiod, and I'm still using sysfs
GPIO for testing (and board farm control ;-)

One reason is that sysfs GPIO just needs echo and cat, which are
available on all my file systems (some predating even sysfs GPIO itself),
while libgpiod is one extra barrier^Wstep to take...

Something simple in debugfs (in/high/low) would be great!

> I am slightly worried that people will start abusing debugfs to do products
> "because it is so simple" if we add this but wel...

Yeah, a while ago, there was some fuzz about distros enabling debugfs,
and this being a security issue.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-11-19 18:50 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
2020-11-11  6:54       ` Damien Le Moal
2020-11-11 15:14         ` Linus Walleij
2020-11-19 18:50           ` Geert Uytterhoeven [this message]
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='CAMuHMdXuz-cvpE7LD=4Bd+pm4qSJVGDzaT1e9M-bgO-bZ7NpPw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=bgolaszewski@baylibre.com \
    --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.