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

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

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

929 Views
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 Kudos
1 Reply

539 Views
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 Kudos