Blog

Introducing libgpiod

Wednesday, 15 Sep 2021  |  Nathan Drude

Variscite is introducing support for libgpiod, the new and recommended way for accessing GPIO from userspace. libgpiod was introduced in Linux 4.8 and provides both command line utilities and library bindings for C/C++ and Python. Variscite has added libgpiod support to all software releases starting from Yocto Dunfell, Boot2Qt Dunfell, and Debian Bullseye.

 

Previously, the recommended way of accessing GPIOs from Linux userspace was using the GPIO sysfs interface, which is limited and requires custom userspace libraries for higher level programming languages like C, C++, Python, etc.

 

Moving forward, the sysfs interface is being deprecated. For now, it will continue to be maintained, but no new features will be added. Please monitor the kernel documentation for the latest information.

 

Instead, it is now recommended to use libgpiod.
libgpiod has several significant improvements over the GPIO sysfs interface:

 

  • Userspace libraries for C/C++ and Python provide a standardized API
  • Each GPIO controller is registered as a character device in /dev so GPIO allocation is tied to the process that is using it
  • Multiple GPIO pins can be read at once
  • GPIO controllers and pins can be found by name
  • GPIO pin settings can be configured at runtime (pull-up, pull-down, etc.)
  • Interrupt driven event monitoring (rising, falling, etc.)

 

DART-MX8M-PLUS
DART-MX8M-PLUS System on Module

 

For more information about using libgpiod, check out the DART-MX8M-PLUS GPIO sample guide or visit the ‘how to’ section on the chosen SoM and Yocto release page within Variscite’s wiki website.

Latest Posts
Software releases
February Software Releases
Stay current with software updates – Keep your Variscite SoMs performing at their best with our latest software releases.
 
23.02.2026
Newsroom
new VAR-SMARC-MX8M-PLUS at Embedded World 2026
Variscite will present a new product lineup built around the Smart Mobility Architecture (SMARC) form factor standard during Embedded World 2026, running March 10-12 in Nuremberg, Germany. The debut will feature the first public reveal of the VAR-SMARC-MX8M-PLUS, running on NXP’s i.MX 8M Plus processor. Visitors can find Variscite at booth 4A-342 in the Exhibition Centre.
26.02.2026
Blog
VAR-SOM-MX8M-NANO
Choosing your SoM partner starts with understanding manufacturing models
27.11.2025