NXP SDK supports sysfs possibility for GPIO/IRQ using from user space.
Check please that the following kernel configuration options are set. These options are necessary for sysfs GPIO support:
-*- GPIO Support --->
[*] /sys/class/gpio/... (sysfs interface)
[*] MPC512x/MPC8xxx GPIO support
GPIO controllers should be declared in the Device Tree file.
More information on the device tree GPIO declaration can be found in the kernel source.
See please the following files:
/Documentation/powerpc/dts-bindings/gpio.txt and /Documentation/powerpc/dts-bindings/fsl/8xxx_gpio.txt
This possibility is available using sysfs from user space.
See the following pages
(http://elinux.org/GPIO)
and
(https://www.kernel.org/doc/Documentation/gpio/sysfs.txt).
and
(http://www.lindusembedded.com/blog/2011/12/29/gpio-general-purpose-inputoutput-interfaces-in-linux-2...)
and
(https://www.kernel.org/doc/Documentation/gpio/sysfs.txt).
Attached file contains .dts file and command dump for GPIO using.
The second method consist of using mmap command.
It is a POSIX-compliant Linux/Unix system call that maps files or devices into memory.
It is a method of memory-mapped file I/O.
For example, look at the following links (http://en.wikipedia.org/wiki/Mmap) and
(http://beej.us/guide/bgipc/output/html/multipage/mmap.html).
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------