Alessio Ciregia
2018-08-09 19:43:03 UTC
Hello.
Tell me if I understand correctly the situation about GPIO on Fedora.
(Please note: I'm not an engineer nor a developer). I'm asking this
because I'm unable to find suitable and exaustive (for me)
documentation.
GPIO sysfs interface is deprecated, and in the future will be removed
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.
To use this device we can't use ordinary commands line tools (echo,
cat, etc), but you have to go through some library.
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).
Furthermore, using the provided libgpiod tools, all that you can do at
the moment is putting a pin to high or to low level, and read the
level.
At last, at least on the Raspberry Pi, the gpioinfo command provides a
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
fact is that these lines, these numbers are unmapped to the GPIO pins
(I'm unable to find documentation): if I try every line offset with
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)?
Sorry if I wrote a bunch of garbage. Any clarification will be welcome.
Ciao,
A.
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.org/message/ZBU
Tell me if I understand correctly the situation about GPIO on Fedora.
(Please note: I'm not an engineer nor a developer). I'm asking this
because I'm unable to find suitable and exaustive (for me)
documentation.
GPIO sysfs interface is deprecated, and in the future will be removed
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.
To use this device we can't use ordinary commands line tools (echo,
cat, etc), but you have to go through some library.
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).
Furthermore, using the provided libgpiod tools, all that you can do at
the moment is putting a pin to high or to low level, and read the
level.
At last, at least on the Raspberry Pi, the gpioinfo command provides a
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
fact is that these lines, these numbers are unmapped to the GPIO pins
(I'm unable to find documentation): if I try every line offset with
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)?
Sorry if I wrote a bunch of garbage. Any clarification will be welcome.
Ciao,
A.
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.org/message/ZBU