'Implementation of libgpiod in embedded Linux with Kernel 5.4 on DART6ul

I'm working on a DART6UL iMX6-based SoM with Kernel 5.4. Previously, I worked on the same board with previous release of Kernel (3.1): to manage GPIO a friend used some utilities from GUMSTIX (gpio and gpio-event-drv based on /sys/class/gpio), because he found easier to manage GPIO. Now I read, for Kernel newer than 4.8, the old /sys/class/gpio was deprecated and better to use libgpiod library. How to implement in my filesystem? Do I have to compile as module or is it already inserted as driver? Launching as NFS and entering as root it seems doesn't be present (ls /dev doens't find any gpiochip). Once obtained the GPIO management as gpiochip according to libgpiod, I need to implement in my program: previously I included both header and put "c" files in my program. Does I am to do the same? The best would be a step-by-step guide to do this... Is there anyone who has faced with the same issue? Paolo



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source