GPIOs in Linux

Getting the state of GPIO in linux

You need to add CONFIG_DEBUG_FS=yinto your kernel .config file. After that you can run mount -t debugfs debugfs /sys/kernel/debug To view the state of all the available GPIO pins type cat /sys/kernel/debug/tegra_gpio