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?

636件の閲覧回数
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

ラベル(4)
0 件の賞賛
1 返信

405件の閲覧回数
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 件の賞賛