From: Alexander Dahl <ada@thorsis.com>
To: "Westermann, Oliver" <Oliver.Westermann@cognex.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: Assign line names at runtime
Date: Fri, 12 Jan 2024 09:33:03 +0100 [thread overview]
Message-ID: <20240112-bae1723ee5e0e88ea87c79ef@thorsis.com> (raw)
In-Reply-To: <PH0PR06MB83342EF7DF19F93CF257756786682@PH0PR06MB8334.namprd06.prod.outlook.com>
Hello Oliver,
Am Thu, Jan 11, 2024 at 10:42:51AM +0000 schrieb Westermann, Oliver:
> I hope that this is the right place to ask a question in regards to
> gpiod, if not, feel free to point me the right way.
Should be the right place I guess.
> We're transitioning from using the old sysfs interface to using
> gpiod and named lines. For most devices, we specify line names at
> boot time using gpio-line-names.
You mean you specify those in .dts?
> On some devices we have small differences between revisions or
> hardware variants, which causes lines to be swapped on GPIO
> expanders or just being used differently for between revisions. We
> started to handle this by overlays, but that requires to distinguish
> during the bootloader phase, which is hard to service and often
> unneeded. Especially when we want to rename a single line, the
> overlay needs to override all entries, which leads to duplication of
> those line name lists.
So essentially you have hardware variants. In my opinion this should
be handled in the bootloader. What about having a .dtsi for the
common part of the board, one .dts file for each variant, and the
bootloader picking the correct one? This is probably less complicated
than handling with overlays. Overlays are designated for a different
use case like add-on boards, aren't they?
Greets
Alex
> Is there a way to assign or change the line-name value at runtime?
> If not today, would that be a desired feature (as we're looking for way to test contributing back)?
>
> Best regards, Olli
next prev parent reply other threads:[~2024-01-12 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 10:42 Assign line names at runtime Westermann, Oliver
2024-01-11 15:10 ` Bartosz Golaszewski
2024-01-11 16:28 ` Kent Gibson
2024-01-12 8:33 ` Alexander Dahl [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-11 16:52 Westermann, Oliver
2024-01-12 0:35 ` Kent Gibson
2024-01-12 11:26 ` Bartosz Golaszewski
2024-01-12 12:31 ` Kent Gibson
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=20240112-bae1723ee5e0e88ea87c79ef@thorsis.com \
--to=ada@thorsis.com \
--cc=Oliver.Westermann@cognex.com \
--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 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).