This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
With respect to GPIO control, tt depends on what version of Linux you are running. Early versions use devfs and ioctl. Later versions use sysfs and read/write. If you have the Linux kernel source, the "Documentation/gpio.txt" describes the capability of your version. Note that your kernel must be compiled with GPIO device support.