of_reset_control_get_shared(9)
π NAME π
of_reset_control_get_shared β bestie, this is the one that goes and looks up a reset controller and hands you a shared reference to it. Like, you're not the only one holding it, and that's literally the whole point β¨
(oh also, hi, this is the Kernel API Manual β welcome to the function-specific corner of the kernel docs π)
β¨ SYNOPSIS β¨
struct reset_control * of_reset_control_get_shared (struct device_node
*node , const char *id );
πΈ ARGUMENTS πΈ
nodeβ the device that's getting reset by the controller π like, this is the main character here.idβ the name of the reset line π
π DESCRIPTION π
Okay so here's the tea π« β when a reset-control is shared, the behaviour of reset_control_assert / deassert is genuinely different, no cap. The reset-core keeps track of a deassert_count and it will only (re-)assert the reset after reset_control_assert has been called as many times as reset_control_deassert was called. It's giving β¨reference counting energyβ¨ ngl. Also, go peek at the remark about shared reset-controls over in the reset_control_assert docs π
β οΈ Real talk, bestie β callingreset_control_assertwithout first callingreset_control_deassertis not allowed on a shared reset control. Periodt. And callingreset_control_resetis also not allowed on a shared reset control. Not me warning you twice π
It returns a struct reset_control or an IS_ERR condition containing errno π
Use of id names is optional π¦ (so like, optional optional, not a vibe check you have to pass)
π₯ SEE ALSO π₯
Kernel file ./include/linux/reset.h β and honestly the whole reset-core 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_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)
okay that's the whole page, you ate that π
this lil doc lives in ./include/linux and it's dated October 2026 β so it's from the future, iconic behavior honestly π¦β¨
π¦ 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