New GPIO Interface for User Space
summary
Linux deprecates the GPIO sysfs interface (since v4.8) in favor of a GPIO character device that lets user space open a chip, request up to 64 lines at once, and set/get all values with a single ioctl to avoid many context switches. The new UAPI supports pollable per-line events with timestamps, line names and consumer strings, udev-friendly device files, and a tested userspace toolkit libgpiod (CLI: gpioinfo, gpioset, gpiomon; current stable ~0.3.1, 1.0 in progress). A gpio-mockup kernel module verifies ABI behavior and event delivery.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:57What is a GPIO
- 3:34Provider and Consumer
- 8:02Legacy User Space
- 12:36New User Space Interface
- 18:43Line
- 19:59Direct
- 20:27Flex
- 21:07Request
- 23:01Set
- 23:54Events
- 25:15Pulling Events
- 26:23Project History
- 30:06C API
- 31:31Simple API
- 32:06Lowlevel API
- 33:15GPIO Tools
- 34:15GPIO Find
- 36:53GPIO daemon
- 37:44Where to get
- 38:36Questions
related talks
51mGPIO for Engineers and Makers
32mlibgpiod V2: New Major Release with a Ton of New Features
32mLibgpiod V2: New Major Release with a Ton of New Features
23mGive Me Back My GPIO Persistence Intro to the libgpiod GPIOManager
23mGive Me Back My GPIO Persistence Intro to the libgpiod GPIOManager
48mPin Control and GPIO Update
19mPinctrl and GPIO - Interactions and Footguns
37mIntroduction to Pin Muxing and GPIO Control Under Linux
