Re: Assign line names at runtime

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

 



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




[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