devm_gpiod_put_array(9)
π devm_gpiod_put_array β the kernel API manual, bestie edition β¨
okay so you're in the Kernel API Manual and the star of the show today is devm_gpiod_put_array(9). buckle up π
πΈ NAME πΈ
devm_gpiod_put_array β it's the resource-managed gpiod_put_array(), no cap π
β¨ SYNOPSIS β¨
void devm_gpiod_put_array (struct device *dev , struct gpio_descs *descs );
that's it, that's the whole signature, she's literally that simple π«Ά
π¦ ARGUMENTS π¦
devβ the GPIO consumer. yeah, that's you, you're the consumer πdescsβ the GPIO descriptor array you're disposing of. bye bestie π
π§ DESCRIPTION π§
so basically this disposes of an array of GPIO descriptors that you got with devm_gpiod_get_array. iconic behavior β
but here's the tea π₯: normally you will not call this function, because the GPIOs get disposed of by the resource management code. the resource management code is the main character here, and honestly? it's got it handled. periodt π
π SEE ALSO π
- Kernel file
./drivers/gpio/gpiolib-devres.c 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_put(9)devm_gpiod_unhinge(9)devm_gpiochip_add_data_with_key(9)
like, go read all of them, iykyk π
real talk bestie: if you're reaching for this one manually, double-check that the resource management code isn't already about to do it for you π
mwah π that's the whole page! it lives in ./drivers/gpio, it's dated October 2026, and this edition was served up by the Kernel API Manual β catch you in the next one, bestie πππΈ
π¦ 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