First of all, about this system:
I didn't build it, but it was tailored and customized with a lot of functions removed. The kernel version appears to be v4.x. It's running on an embedded system.
When I call in my program
echo 0 > /sys/class/gpio/gpioX/value
where "X" is my desired pin, I got an error message in the bash, produced not by my printf calls in the program but by system:
sh: write error: Device or resource busy
I can see all the pins that I want to use under:
/sys/class/gpio
and not:
/sys/kernel/debug/gpio
in fact, "/sys/kernel/" doesn't even have a debug folder to begin with, which I believe is sufficient to draw the conclusion that no system process is occupying the port.
Furthermore, using lsof
produced a long list but no GPIO could be found.
Usually if you saw the titular error message you just locate the process and kill it right? But in this case I couldn't even find the process. What should I do?