Hi, Le 08/03/2018 à 16:13, Stefan Brüns a écrit :
On Mittwoch, 7. März 2018 08:41:14 CET Raz wrote:
Hey
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 /sys/class/gpio/gpiochip458/base:458
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. See https://elinux.org/images/9/9b/GPIO_for_Engineers_and_Makers.pdf#page=14 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 here: https://download.opensuse.org/repositories/home:/Guillaume_G:/ARM/openSUSE_L... Guillaume -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org