__devm_mux_state_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __devm_mux_state_get(9) πŸ’…

okay so bestie, this page is from the Kernel API Manual, and it's giving β€œresource-managed mux-state acquisition” energy. The star of the show is __devm_mux_state_get, and it's here to get the optional mux-state for a device, with resource management. No cap. πŸ¦‹


✨ NAME ✨

__devm_mux_state_get β€” get the optional mux-state for a device, with resource management. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct mux_state * __devm_mux_state_get (struct device *dev , const char
       *mux_name , bool optional , struct device_node *np , int (*init)(struct
       mux_state *mstate) , int (*exit)(struct mux_state *mstate) );

🌸 ARGUMENTS 🌸

  • dev β€” the device that needs a mux-state. πŸ‘‘
  • mux_name β€” the name identifying the mux-state. 🏷️
  • optional β€” whether to return NULL and silence errors when the mux doesn't exist. πŸ™ˆ
  • np β€” the device nodes; if it's NULL, it uses dev->of_node. 🌳
  • init β€” optional function pointer for mux-state object initialisation. πŸ› οΈ
  • exit β€” optional function pointer for mux-state object cleanup on release. 🧹

πŸ”₯ RETURN πŸ”₯

On success you get a pointer to the mux-state. On error you get an ERR_PTR with a negative errno. Or, if optional is true and the mux doesn't exist, you get NULL. That's the whole return vibe. πŸ’–


🌈 SEE ALSO 🌈

the whole friend group is here:


xoxo, bestie β€” source/version ./drivers/mux, dated October 2026 πŸ’œ

πŸ“¦ where this page comes from