devm_mux_state_get_selected(9)
π devm_mux_state_get_selected(9) π
okay so welcome to the Kernel API Manual, bestie β todayβs main character is devm_mux_state_get_selected(9), and itβs literally the resource-managed way to get a mux-state for a device. slay. π
πΈ NAME πΈ
devm_mux_state_get_selected β get the mux-state for a device, with resource management. π«Ά
β¨ SYNOPSIS β¨
struct mux_state * devm_mux_state_get_selected (struct device *dev ,
const char *mux_name );
π ARGUMENTS π
devβ the device that needs a mux-state. π₯mux_nameβ the name identifying the mux-state. π¦
π¦ RETURN π¦
you get back a pointer to the mux-state, or an ERR_PTR with a negative errno. thatβs the vibe: pointer = yes, ERR_PTR with negative errno = nope π.
π DESCRIPTION π
the returned mux-state (if valid) is already selected. periodt. π
and on release, the mux-state will automatically be deselected and freed β resource management is doing the cleanup arc for you, no cap. π§
π SEE ALSO π
the kernel file is ./drivers/mux/core.c, and the whole friend group is:
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(9)devm_mux_state_get_from_np(9)devm_mux_state_get_optional(9)devm_mux_state_get_optional_selected(9)
okay bye bestie β source/version: ./drivers/mux, dated October 2026, for devm_mux_state_get_selected(9) π«Άπ
π¦ 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