Enabling GPIO G10

We have a custom carrier board that needs to use pin G10 as a GPIO pin.

Specifically, I would like to use it as an input pin that connected to a GPS pulse-per-second signal.

In the past this has been done using the sysfs gpio interface. In reading the forum it was not clear how to export a specific pin that can be interfaced with sysfs.

Any help is greatly appreciated.

hello rayrayray,

share some tips for your reference, thanks

  1. change to super-user mode.
  2. enter below path

cd /sys/class/gpio

  1. generate gpio name, for example gpio220. please refer to kernel/arch/arm/mach-tegra/gpio-names.h for details.

echo 220 > export

  1. enable the gpio220

cd gpio220

echo out > direction && echo 1 > value