reset_control_get_shared(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… reset_control_get_shared β€” okay so you want a shared reset controller

Bestie, welcome to the Kernel API Manual, section 9, and today's main character is reset_control_get_shared. She's the function you call when you wanna look up a reset controller and grab a shared reference to it. Not exclusive. Shared. There's a difference and we will be discussing it. πŸŽ€


✨ SYNOPSIS ✨

struct reset_control * reset_control_get_shared (struct device *dev ,
const char *id );

That's her. That's the whole call. Two arguments, one pointer back, and a whole lot of vibes. πŸ¦‹


🌸 ARGUMENTS 🌸

  • dev β€” the device that's gonna get reset by the controller. She's the one being handled, bestie. 🫢
  • id β€” the reset line name. That's literally it. Just the name of the reset line.

πŸ‘‘ DESCRIPTION πŸ‘‘

So what does she actually do? She returns a struct reset_control, or β€” plot twist β€” an IS_ERR condition containing errno. So yeah, vibe check your return value before you dereference it, no cap. πŸ’€

This function is intended for use with reset-controls which are shared between hardware blocks. Multiple hardware blocks, one controller, they're all sharing it like a group chat. 😭

And here's the part where the behavior changes, so listen up. When a reset-control is shared, the behavior of reset_control_assert / reset_control_deassert is different. The reset-core will keep track of a deassert_count and only (re-)assert the reset after reset_control_assert has been called as many times as reset_control_deassert was called. It's giving "I'll match your energy, but only exactly" energy. Also, please go see the remark about shared reset-controls in the reset_control_assert docs β€” it's all there, iykyk. πŸ”₯

⚠️ Real talk, bestie: 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. Periodt. Don't do it. πŸ™…β€β™€οΈ

Also, use of id names is optional β€” so if you don't have one, that's lowkey fine. ✨


πŸ’– SEE ALSO πŸ’–

Kernel file ./include/linux/reset.h, plus a whole friend group of related functions β€” genuinely iconic lineup, I'm obsessed:


🌈 SIGN-OFF 🌈

Okay that's the page, bestie πŸ’œ β€” shipped from ./include/linux, dated October 2026, filed under reset_control_get_shared(9). Go forth and share your reset controllers responsibly. Slay. βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from