Hi Linus, On Wed, Nov 11, 2020 at 4:16 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Wed, Nov 11, 2020 at 7:54 AM Damien Le Moal <Damien.LeMoal@xxxxxxx> 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@xxxxxxxxxxxxxx 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