On Donnerstag, 14. Juni 2018 17:50:56 CEST Alexander Graf wrote:
> On 06/14/2018 05:43 PM, Freek de Kruijf wrote:
> > Op woensdag 13 juni 2018 15:58:25 CEST schreef Alexander Graf:
> >> On 13.06.18 14:27, Freek de Kruijf wrote:
> > 
> > I used the strace and found that in fact the equivalent bash command:
> > echo "4" > /sys/class/gpio/export
> > gives the error message:
> > -bash: echo: write error: Invalid argument
> > This command should create new devices /sys/class/gpio/gpio4/* which one
> > can use to change the behavior of the GPIO pins.
> > 
> > What can be done to make this basic bash command work.
> > Below some more information as root:
> > # ls -l /sys/class/gpio/
> > total 0
> > --w------- 1 root root 4096 jun 14 17:41 export
> > lrwxrwxrwx 1 root root    0 apr 23 09:40 gpiochip298 -> ../../devices/
> > platform/soc/20200000.gpio/gpio/gpiochip298
> > --w------- 1 root root 4096 jun 14 16:34 unexport
> 
> Sounds like the library doesn't realize that there is an offset for GPIO
> numbers on the system. The DT usually indicates what the respective
> offset is.

Unfortunately the RPi foundation kernel is patched to hardcode the offset to 
0, so any of these simplistic wrappers only work with the foundation kernel, 
but not with the upstream kernel, or on any other boards.

Kind regards,

Stefan--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to