pwrseq_to_device(9)
π pwrseq_to_device β kernel API manual, bestie edition
Okay so real talk, this one is from the Kernel API Manual and it's called pwrseq_to_device(9). Tiny function, big "let me just grab that pointer" energy. Let's get into it π«Ά
β¨ NAME β¨
pwrseq_to_device β get the pwrseq device pointer from a descriptor. That's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
struct device * pwrseq_to_device (struct pwrseq_desc *desc );
π ARGUMENTS π
descβ descriptor referencing the power sequencer. Like, the little handle that says "yes bestie, this pwrseq".
π¦ DESCRIPTION π¦
So what this does is return the 'dev' pointer of the power sequencer device that's associated with desc. Simple. Clean. Slay.
Consumer drivers can use this to query the pwrseq provider's device tree node β for example, to check whether specific properties even exist. iykyk, sometimes you just gotta peek at the node and vibe check it β¨
And here's the important bit, no cap: since pwrseq_get already takes a reference to the pwrseq device, this function does not take an additional reference. So don't go pwrseq_put-ing this like you own it, because you don't. π
β RETURN β
Pointer to the pwrseq struct device, or NULL if desc is NULL. That's the whole deal β null in, null out, no drama π§
π SEE ALSO π
- Kernel file
./drivers/power/sequencing/core.c struct pwrseq_unit(9)struct pwrseq_unit_dep(9)struct pwrseq_target(9)struct pwrseq_device(9)struct pwrseq_desc(9)pwrseq_device_register(9)pwrseq_device_unregister(9)devm_pwrseq_device_register(9)pwrseq_device_get_drvdata(9)pwrseq_get(9)pwrseq_put(9)devm_pwrseq_get(9)pwrseq_enable(9)pwrseq_disable(9)
Go read the whole family, they're all icons honestly π
That's the page, bestie π β straight out of ./drivers/power/sequencing, dated October 2026, no notes. Mwah π
π¦ 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