Re: [PATCH] gpio: Do not trigger WARN() with sysfs gpio export/unexport

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

 



On Tue, 2020-11-10 at 15:31 +0100, Linus Walleij wrote:
> On Fri, Nov 6, 2020 at 12:27 PM Damien Le Moal <Damien.LeMoal@xxxxxxx> 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.

This is not a RISC-V thing. It is just me who found sysfs very convenient for
testing my work on the K210 board. I was not aware that the sysfs GPIO
interface is being deprecated. I have added it to the K210 default kernel
config file. I will remove it. 

> 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.

> 
> Yours,
> Linus Walleij

-- 
Damien Le Moal
Western Digital




[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