Unable to access gpios in sysfs entries for 3.14 kernel version with dts files

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unable to access gpios in sysfs entries for 3.14 kernel version with dts files

945件の閲覧回数
bandarulavanya
Contributor V

Hi All,

i want to toggle gpio pins in sysfs entries.

eg: pin7

echo 7 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio7/direction

cat /sys/class/gpio/gpio7/direction

out

cat  /sys/class/gpio/gpio7/value

0

echo 1 > /sys/class/gpio/gpio7/value

cat  /sys/class/gpio/gpio7/value

0

Here i am not able to change value for this gpio.

i tried with some other gpio's also all are giving like this only

can anyone please help me i am new to the device tree files.

for this am i need to give any thing in dts file.

Thanks & Regards,

Lavanya

0 件の賞賛
1 返信

555件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Lavanya

please look at simple sysfs gpio tutorial on

Definitive GPIO guide - Studio Kousagi Wiki

Any examples on how to modify the .dts (device tree) source for custom hardware?

also check that used pins were not used for other modules.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛