Re: GPIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

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 (echo,
> 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 at
> the moment is putting a pin to high or to low level, and read the
> level.

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 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

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 pins
> (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 welcome.

Nope, completely relevant, the GPIO bits in general upstream need
improving, I've discussed this a few times, it's getting there but way
too slowly.
_______________________________________________
arm mailing list -- arm@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to arm-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/arm@xxxxxxxxxxxxxxxxxxxxxxx/message/H6ALG74TIFO55FWQAOAJM2AB2X5LCCY2/




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux