devm_reset_c...red_by_index(9)
π devm_reset_control_get_shared_by_index (Kernel API Manual)
okay so this one's from the Kernel API Manual, bestie, and it's one of those devm_-prefixed baddies β you already know what that means (we'll get there, don't worry π«Ά).
β¨ NAME β¨
devm_reset_control_get_shared_by_index β resource managed reset_control_get_shared
like, it's the shared-getter but the managed version. main character energy π₯
π SYNOPSIS π
struct reset_control * devm_reset_control_get_shared_by_index (struct
device *dev , int index );
yes she returns a struct reset_control *, no she's not doing it alone π
πΈ ARGUMENTS πΈ
devβ the device that's gonna get reset by the controller. it's literally the whole point of the call, she's the one being reset π―indexβ the index of the reset controller. like which one, bestie. you gotta tell her which one π
π¦ DESCRIPTION π¦
So this is the managed version of reset_control_get_shared β same vibe, but with the devm_ glow-up β¨.
Here's the tea, and it's the whole reason this function exists: for reset controllers returned from this function, reset_control_put gets called automatically on driver detach. no manual cleanup, no "oops I forgot to free it," no leaks. she handles it. slay π
And if you wanna know more about the actual shared semantics? go read reset_control_get_shared β this page points you there for more information, and honestly same, that's where the details live π
π SEE ALSO π
Kernel file ./include/linux/reset.h, plus the whole friend group:
struct reset_control_bulk_data(9)enum reset_control_flags(9)reset_control_get_exclusive(9)reset_control_bulk_get_exclusive(9)reset_control_get_exclusive_released(9)reset_control_bulk_get_exclusive_released(9)reset_control_bulk_get_optional_exclusive_released(9)reset_control_get_shared(9)reset_control_bulk_get_shared(9)reset_control_get_optional_exclusive(9)reset_control_bulk_get_optional_exclusive(9)reset_control_get_optional_shared(9)reset_control_bulk_get_optional_shared(9)of_reset_control_get_exclusive(9)of_reset_control_get_optional_exclusive(9)of_reset_control_get_shared(9)of_reset_control_get_exclusive_by_index(9)of_reset_control_get_shared_by_index(9)devm_reset_control_get_exclusive(9)devm_reset_control_get_exclusive_deasserted(9)devm_reset_control_bulk_get_exclusive(9)devm_reset_control_get_exclusive_released(9)devm_reset_control_bulk_get_exclusive_released(9)devm_reset_control_get_optional_exclusive_released(9)devm_reset_control_bulk_get_optional_exclusive_released(9)devm_reset_control_get_shared(9)devm_reset_control_get_shared_deasserted(9)devm_reset_control_bulk_get_shared(9)devm_reset_control_bulk_get_shared_deasserted(9)devm_reset_control_get_optional_exclusive(9)devm_reset_control_get_optional_exclusive_deasserted(9)devm_reset_control_bulk_get_optional_exclusive(9)devm_reset_control_get_optional_shared(9)devm_reset_control_get_optional_shared_deasserted(9)devm_reset_control_bulk_get_optional_shared(9)devm_reset_control_get_exclusive_by_index(9)
and that's the page!! π this one came out of ./include/linux, October 2026 vintage, so if you cite her you know exactly where she's from. mwah, go forth and manage your resets π§ββοΈβ
π¦ 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