From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [RFC PATCH] gpio: sysfs: make the sysfs export behavior consistent
Date: Mon, 30 Sep 2024 09:03:34 +0800 [thread overview]
Message-ID: <20240930010334.GA6286@rigel> (raw)
In-Reply-To: <20240927074221.9985-1-brgl@bgdev.pl>
On Fri, Sep 27, 2024 at 09:42:21AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> For drivers or board files that set gpio_chip->names, the links to the
> GPIO attribute group created on sysfs export will be named after the
> line's name set in that array. For lines that are named using device
> properties, the names pointer of the gpio_chip struct is never assigned
> so they are exported as if they're not named.
>
> The ABI documentation does not mention the former behavior and given
> that the majority of modern systems use device-tree, ACPI or other way
> of passing GPIO names using device properties - bypassing gc->names -
> it's better to make the behavior consistent by always exporting lines as
> "gpioXYZ".
>
I have no opinions on sysfs changes.
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Story time:
>
> I decided to learn rust. I figured I'd best find me a project to work on
> that would involve some proper coding but wouldn't have much impact on
> anything important when I inevitably get it wrong the first few times.
>
> 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
next prev parent reply other threads:[~2024-09-30 1:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 7:42 [RFC PATCH] gpio: sysfs: make the sysfs export behavior consistent Bartosz Golaszewski
2024-09-30 1:03 ` Kent Gibson [this message]
2024-09-30 7:20 ` Bartosz Golaszewski
2024-09-30 7:55 ` Kent Gibson
2024-10-02 13:12 ` Linus Walleij
2024-10-02 14:31 ` Bartosz Golaszewski
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=20240930010334.GA6286@rigel \
--to=warthog618@gmail.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).