Replies: 1 comment
-
|
As you figured out: there's no guarantee of the order in which GPIO chip devices are probed. You should typically access them by label. See the output of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On my SOM module (with
Linux v6.12), I have four GPIO chips listed asgpiochip0throughgpiochip3.I have a feeling that these gpiochip indices are not assigned deterministically across reboots, similar to the issue we previously encountered with Ethernet interface names.
Is this indeed the case? Does the numbering (e.g.,
gpiochip1today becominggpiochip3after a reboot) depend on the Linux driver or device initialization order during boot?If so, what’s the recommended way to consistently access a specific GPIO? For example, if our MPU has
GPIO1_87, how can I ensure my firmware reliably maps to the same GPIO line across boots, regardless ofgpiochipXnumbering?Beta Was this translation helpful? Give feedback.
All reactions