Linux GPIO Subsystem: Legacy vs. Descriptor-Based APIs
Legacy GPIO Interface
Kernel API
/* Device-tree helper */
int of_get_gpio(struct device_node *np, int idx);
/* Pin life-cycle */
int gpio_request(unsigned gpio, const char *label);
void gpio_free(unsigned gpio);
/* Direction */
int gpio_direction_input(unsigned gpio);
int gpio_direction_output(unsigned gpio, int value);
/* Value access */ ...
Posted on Thu, 07 May 2026 08:47:11 +0000 by cdorob