of_reset_con...red_by_index(9)
π of_reset_con...red_by_index(9) β Kernel API Manual, but make it cute β¨
okay bestie, welcome to the Kernel API Manual πΈ this one's about of_reset_control_get_shared_by_index, and yes the name is a whole mouthful, we're getting through it together, hand in hand π«Ά
β¨ NAME β¨
of_reset_control_get_shared_by_index β look up a reset controller by index and grab a shared reference to it. That's the whole vibe. π
π SYNOPSIS π
struct reset_control * of_reset_control_get_shared_by_index (struct device_node *node , int index );
like, that's the signature, no notes, iconic β¨
π¦ ARGUMENTS π¦
nodeβ the device that's gonna get reset by the controller. it's giving "who's being reset" energy π«indexβ the index of the reset controller. yeah, the number. the little address on the controller list, iykyk π’
πΈ DESCRIPTION πΈ
so here's the tea π΅ when a reset-control is shared, the behavior of reset_control_assert / deassert gets changed up β the reset-core keeps track of a deassert_count and only (re-)asserts the reset after reset_control_assert has been called as many times as reset_control_deassert was called. not me explaining reference counting at 2am π but like, it's literally just counting, bestie, you got this π
also peep the remark about shared reset-controls in the reset_control_assert docs, ok? don't skip it, it's important π
β οΈ lowkey important: callingreset_control_assertwithout first callingreset_control_deassertis not allowed on a shared reset control. and callingreset_control_resetis also not allowed on a shared reset control. no cap, the kernel will not be happy with you π
returns a struct reset_control or an IS_ERR condition containing errno. π¦
this is to be used to perform a list of resets for a device or power domain in whatever order. and yes, it returns a struct reset_control or an IS_ERR condition containing errno β they said it twice, we're saying it twice, periodt π
π SEE ALSO π
- Kernel file
./include/linux/reset.h 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)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)devm_reset_control_get_shared_by_index(9)
like, that's a lot of friends, but every single one of them is invited to the group chat π«Ά don't leave anyone on read β¨
and that's a wrap bestie!! this whole thing lives in ./include/linux, dated October 2026 β so yeah, from the future, still slaying π
β¨
π¦ 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