reset_control_get_shared(9)
π 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: 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. 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:
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_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)devm_reset_control_get_shared_by_index(9)
π 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
- 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