pwrseq_to_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’œ


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