Re: [RFC PATCH] gpio: sysfs: make the sysfs export behavior consistent

From: Kent Gibson
Date: Mon Sep 30 2024 - 03:56:08 EST


On Mon, Sep 30, 2024 at 09:20:48AM +0200, Bartosz Golaszewski wrote:
> On Mon, Sep 30, 2024 at 3:03 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> >
> > > I decided to write a sysfs-to-libgpiod compatibility layer based on
> > > FUSE. Since Rust is hard, I started prototyping the thing in python
> > > first to at least have the logic nailed down before I tackle the rust
> > > part.
> > >
> >
> > Something along these lines[1]?
> >
> > Cheers,
> > Kent.
> >
> > [1]https://dev.to/krjakbrjak/simulating-gpio-sysfs-interface-with-fuse-and-c-30ga
> >
>
> Well, this doesn't really do anything. I'm thinking about something
> consuming the libgpiod rust bindings to actually be a useful
> replacement for kernel sysfs.
>

I haven't actually looked at that - but when you mentioned a sysfs fuse
interface that rang a bell.

> The master plan is: provide a drop-in user-space replacement for
> sysfs, make users convert to using it instead of the real thing,
> eventually remove sysfs from the kernel and then some time after
> remove the compatibility layer from existence forcing everybody to now
> move to pure libgpiod. :)
>

Ironically a lot of users would probably be happier with that than with
the D-bus daemon. And for that reason I don't think that last step will
ever happen. But that is ok too - as long as we can finally remove the
sysfs interface from the kernel.

Cheers,
Kent.