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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

652 次查看
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 项奖励
1 回复

421 次查看
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 项奖励