GPIO sysfs interface is deprecated, and in the future will be
from the kernel. So in Fedora the kernel is compiled without such
flag. As a consequence we don't have the /sys/class/gpio path.
We have instead /dev/gpiochipN character device.
That is correct. Upstream wants to kill it off due to security and
other issues, Fedora has never really supported the old interface so I
removed it as soon as it was deprecated so we didn't end up with a
massive legacy problem.
To use this device we can't use ordinary commands line tools
cat, etc), but you have to go through some library.
Library or cli tools.
In addition to that, current kernel modules (like wire, wire_therm,
wire_gpio) cannot be used, and someone should write something new (i'm
thinking to 1wire sensors).
Please provide details as to why you think that is the case.
Furthermore, using the provided libgpiod tools, all that you can do
the moment is putting a pin to high or to low level, and read the
You should also be able to set it to input or output at which point it
should be usable.
At last, at least on the Raspberry Pi, the gpioinfo command provides
list of lines. The count of these lines is higher than the number of
pins, and ok, there is something a bit difficult to understand for me,
but I can imagine that the GPIO in the SOC is not only the pinout. The
Yes, the gpio maps to all sorts of things like onboard LEDs, MMC card
detect, BT and WiFi enable pins and all sorts of other things. There
is the ability for the GPIO lines to be labled so you know what they
are, I thought the RPi ones had been but a lsgpio (from the
kernel-tools package) shows they're not yet for at least the RPi2 I
had handy but on another device they are labeled. A quick look at the
DT on the upstream kernel I see the 3B/3B+ have a few labels here and
there but it's not consistent. I've added it to my list to see if I
can't get it improved.
fact is that these lines, these numbers are unmapped to the GPIO
(I'm unable to find documentation): if I try every line offset with
The docs for the RPI are here https://pinout.xyz/
and should be
consistent with Fedora.
the tool gpioset, maybe with a LED, do you think I will be aple to
create a suitable mapping (like saying: line offset 7 is BCM pin 4,
and so on, for instance)?
I believe others have achieved this, maybe have a look at the list
archives for details.
Sorry if I wrote a bunch of garbage. Any clarification will be
Nope, completely relevant, the GPIO bits in general upstream need
improving, I've discussed this a few times, it's getting there but way