of_reset_co...al_exclusive(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, this is of_reset_control_get_optional_exclusive β€” say that five times fast, i dare you β€” and what it does is look up a reset controller and get an optional, exclusive reference to it. that's the whole vibe. lowkey iconic. πŸ’–

(this page lives in the Kernel API Manual, section 9, which is the linux kernel's own little corner of man-page heaven. welcome. 🫢)


✨ SYNOPSIS ✨

struct reset_control * of_reset_control_get_optional_exclusive (struct
device_node *node , const char *id );

like… that's the whole signature. the struct reset_control * is the main character, the two args are the supporting cast. 🎬


πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” the device that's gonna get reset by the controller. that's your lil guy. your target. 🎯
  • id β€” the name of the reset line. the label on the door, iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the optional variant of of_reset_control_get_exclusive, and that's the entire tea. πŸ’β€β™€οΈ

the optional-ness is huge actually: if the reset you're asking for isn't even specified in the device tree, this function does not throw a tantrum and hand you an error β€” it just returns NULL instead. no drama. very demure. 🌸

not the same as an error! NULL means "not there, cool, moving on." an error is a whole different thing, so read the next bit carefully bestie.

it returns a struct reset_control or an IS_ERR condition containing errno. so like, check it. don't just raw-dog the return value. 😭

also, using id names is optional. yes the optionality is optional too. it's optional-ception over here. ✨


🌈 SEE ALSO 🌈

kernel file: ./include/linux/reset.h β€” that's where struct reset_control_bulk_data(9) and enum reset_control_flags(9) live, and honestly the whole friend group is listed below so let's get into it, no cap. this is the entire reset-control extended universe, and yes i'm listing every single one because they all ate. πŸ”₯


k that's the whole page bestie, go reset something responsibly πŸ’œ

source: ./include/linux Β· October 2026 Β· of_reset_co...al_exclusive(9) β€” mwah, signing off, drink some water and don't forget to check your IS_ERR πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from