You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the only way to determine how many chips are valid is to attempt gpiochip_open with some number of different integers and discard any failures. Is there an API to get the list of chips numbers that are valid? If not, what is the range of integers we should test?
The text was updated successfully, but these errors were encountered:
The Linux kernel will assign gpiochip numbers. I assume they would be assigned in order 0, 1, 2, etc. I can think of no reason for not assigning in that order. So try opening increasing numbers until there is a failure.
However that is my assumption. I do not know if the kernel makes any guarantee.
Type the following command in a the terminal to list all available gpiochips: ls /dev/gpiochip*
For more details try: sudo cat /sys/kernel/debug/gpio
I hope this helps!
It appears that the only way to determine how many chips are valid is to attempt
gpiochip_open
with some number of different integers and discard any failures. Is there an API to get the list of chips numbers that are valid? If not, what is the range of integers we should test?The text was updated successfully, but these errors were encountered: