Re: Assign line names at runtime

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

 



On Thu, Jan 11, 2024 at 11:43 AM Westermann, Oliver
<Oliver.Westermann@xxxxxxxxxx> wrote:
>
> Hey,
>
> 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. 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.
>
> 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.
>
> 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

Interesting. There's no way to do this with the current uAPI. We do
however have a way of doing it in the kernel. I also see a use-case
where udev could rename GPIOs on dynamic expanders according to
user-space rules.

Cc'ing Kent who's the author of most of the uAPI code.

I'm in general open to enabling it but the problem here is that this
would open a real can of worms with *global* and *persistent* state
controlled from user-space going against the design of the character
device.

Bartosz





[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