Is there a bug in the sysfs gpio read implementation of linux kernel 3.14.28 for iMX6?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a bug in the sysfs gpio read implementation of linux kernel 3.14.28 for iMX6?

795 Views
joerutledge
Contributor III

I've got a Fido Yocto build generating a 3.14.28 Linux kernel with GPIO sysfs support for my iMX6Q. When controlling the GPIOs vis sysfs I get expected behaviour on a write but unexpected behaviour on a read. Having set the direction appropriately reading from "value" in sysfs I get 0 returned for an unset GPIO but I get a 32 bit value with just the bit set representing the gpio within the bank for a "set" value. This seems to be against the kernel documentation implying a 0 or 1 response for the GPIO.

Is this a known bug or have I misconfigured something or have I just misinterpreted expected behaviour?

Many thanks,

Joe

0 Kudos
Reply
1 Reply

564 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Joe,

You could take a look at the following thread:

iMX28 GPIO Setup In Device Tree


Hope this will be useful for you.
Best regards!
/Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply