__devm_mux_state_get(9)
π
__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 returnNULLand silence errors when the mux doesn't exist. πnpβ the device nodes; if it'sNULL, it usesdev->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:
- Kernel file:
./drivers/mux/core.c struct mux_state(9)struct devm_mux_state_state(9)mux_chip_alloc(9)mux_chip_register(9)mux_chip_unregister(9)mux_chip_free(9)devm_mux_chip_alloc(9)devm_mux_chip_register(9)mux_control_states(9)mux_control_select_delay(9)mux_state_select_delay(9)mux_control_try_select_delay(9)mux_state_try_select_delay(9)mux_control_deselect(9)mux_state_deselect(9)mux_get(9)mux_control_get(9)mux_control_get_optional(9)mux_control_put(9)devm_mux_control_get(9)mux_state_get(9)devm_mux_state_get_from_np(9)devm_mux_state_get_optional(9)devm_mux_state_get_selected(9)devm_mux_state_get_optional_selected(9)
xoxo, bestie β source/version ./drivers/mux, dated October 2026 π
π¦ 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