devm_gpiod_put(9)
hey bestie, welcome to devm_gpiod_put(9) from the Kernel API Manual β¨ this page is short, but itβs giving automatic cleanup main character energy, and weβre keeping every detail, periodt.
π NAME π
devm_gpiod_put β Resource-managed gpiod_put() π«Ά
π¦ SYNOPSIS π¦
okay so the signature is literally right here:
void devm_gpiod_put (struct device *dev , struct gpio_desc *desc );
π ARGUMENTS π
devβ the GPIO consumer πdescβ the GPIO descriptor to dispose of ποΈ
πΈ DESCRIPTION πΈ
so this function disposes of a GPIO descriptor obtained with devm_gpiod_get or devm_gpiod_get_index. thatβs the whole job, and it ate. π
normally this function will not be called, because the GPIO will be disposed of by the resource management code. the resource management code is doing the cleanup for you, iykyk. so yeah β usually you donβt need to call this yourself, fr fr.
π SEE ALSO π
Kernel file: ./drivers/gpio/gpiolib-devres.c
and here are all the related besties:
devm_gpiod_get(9)devm_gpiod_get_optional(9)devm_gpiod_get_index(9)devm_fwnode_gpiod_get_index(9)devm_gpiod_get_index_optional(9)devm_gpiod_get_array(9)devm_gpiod_get_array_optional(9)devm_gpiod_unhinge(9)devm_gpiod_put_array(9)devm_gpiochip_add_data_with_key(9)
xoxo, your kernel bestie π
β source: ./drivers/gpio β’ October 2026 β’ devm_gpiod_put(9)
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms