Le 08/03/2018 à 16:13, Stefan Brüns a écrit :
On Mittwoch, 7. März 2018 08:41:14 CET Raz wrote:
I am using raspberry PI3 64bit.
I am failing to export a gpio. ie; when I enter:
echo 4 > /sys/class/gpio/export
I get permission denied.
You more likely get -EINVAL:
$> echo 4 > /sys/class/gpio/export
bash: echo: write error: Invalid argument
$> grep -H "" /sys/class/gpio/gpiochip*/base
The base address of the only GPIO controller on the RPI(3) is 458 in the
mainline kernel. Setting the base address to 0 is a Rasbpian specific
modification of the mainline kernel. This works for RPi, but is not in line
with any other SoC/SBC.
$> echo 462 > /sys/class/gpio/export
works, but caveat below.
Due to various problems with the /sys/class/gpio/ interface it is deprecated.
ff for more details.
But that is true that sysfs interface is convenient.
You can also use gpio tools (lsgpio, gpio-hammer and gpio-event-mon) provided in the
kernel sources. I did a quick packaging in my home. You can download it for Leap 42.3 from
To unsubscribe, e-mail: opensuse-kernel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner(a)opensuse.org