/sys/class/gpio is not giving gpioN

Moderator: nferre

freaky_geek234
Posts: 9
Joined: Sat May 13, 2017 12:06 pm

/sys/class/gpio is not giving gpioN

Thu Oct 26, 2017 3:08 pm

Hi,

if i use /sys/class/gpio

and echo 106 > export

then PD10 is being formed instead of GPIO106(of course both are same). But if i want to know this will not create any problem.

generally when we want to control gpio we will look for /sys/class/gpio/gpioN/

but in this case it will be /sys/class/gpip/PXY/

where XY keeps on changing.

is there any way we can make it gives gpio106 only instead of PD10.
blue_z
Location: USA
Posts: 1741
Joined: Thu Apr 19, 2007 10:15 pm

Re: /sys/class/gpio is not giving gpioN

Tue Oct 31, 2017 2:00 am

freaky_geek234 wrote:if i use /sys/class/gpio

and echo 106 > export

then PD10 is being formed instead of GPIO106(of course both are same).
You've done a poor job (i.e. inaccurate) job of describing the issue.
AFAIK the name of the GPIO would not be "PD10", but rather pioD10.

freaky_geek234 wrote:... in this case it will be /sys/class/gpip/PXY/

where XY keeps on changing.
I don't understand what you mean by it "keeps on changing". There is a deterministic, one-to-one mapping of pin number to PIO controller (A, B, C, ...) and I/O line (0:31).

freaky_geek234 wrote:is there any way we can make it gives gpio106 only instead of PD10.
If you don't want Atmel's more-readable pin name, then the kernel source code has to be hacked. It's not a configuration option.

Regards

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 1 guest