of_reset_con...red_by_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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: calling reset_control_assert without first calling reset_control_deassert is not allowed on a shared reset control. and calling reset_control_reset is 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 🌈

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