Why I have gpiochip792 in /sys/class/gpio but `gpiodetect` says me that I have gpiochip0

572 views Asked by At

Why I have gpiochip792 in /sys/class/gpio but gpiodetect says me that I have gpiochip0? In /sys/class/gpio I have only gpiochip792 link.

1

There are 1 answers

0
0andriy On

/sys/class/gpio folder is visible when legacy GPIO interface is enabled. While the /dev/gpiochip0 is for new character device interface that has to be used. libgpiod project supplies a few shell tools to get an information about GPIO chips and manipulate lines on them (to some extent). That said, the two in the question are different representation depending on the ABI user wants to use.