dev_pm_qos_add_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_pm_qos_add_request(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” yes this is the actual manual page for dev_pm_qos_add_request, and yes we're gonna get through it together, no cap ✨


🌸 NAME 🌸

dev_pm_qos_add_request β€” inserts new qos request into the list 🫢


✨ SYNOPSIS ✨

int dev_pm_qos_add_request (struct device *dev , struct
dev_pm_qos_request *req , enum dev_pm_qos_req_type type , s32 value );

like literally that's the whole signature, she's not that complicated πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” target device for the constraint. this is the device you're doing the whole thing for, bestie πŸ¦‹
  • req β€” pointer to a preallocated handle. you bring the handle, she just fills it in πŸ’œ
  • type β€” type of the request. iykyk 🌈
  • value β€” defines the qos request. the actual number-vibe you're asking for ⭐

🧚 DESCRIPTION 🧚

okay so here's the tea β˜• β€” this function inserts a new entry in the device constraints list of requested qos performance characteristics. iconic behavior honestly.

it recomputes the aggregate QoS expectations of parameters and initializes the dev_pm_qos_request handle. two things, one function, main character energy πŸ‘‘

⚠️ real talk: the caller needs to save this handle for later use in updates and removal. do NOT lose it, bestie. that's your receipt 😭

now the return values, and we are not skipping a single one:

  • returns 1 if the aggregated constraint value has changed
  • returns 0 if the aggregated constraint value has not changed
  • returns -EINVAL in case of wrong parameters
  • returns -ENOMEM if there's not enough memory to allocate for data structures
  • returns -ENODEV if the device has just been removed from the system πŸ’€
🫢 heads up: callers should ensure that the target device is not RPM_SUSPENDED before using this function for requests of type DEV_PM_QOS_FLAGS. like please do the vibe check first, fr fr.

πŸ”₯ SEE ALSO πŸ”₯

all the siblings, and there are so many of them, we love a big family 🌸. they live in the kernel file ./drivers/base/power/qos.c:


and that's the whole page, bestie, you ate that πŸ“πŸ’…

sign-off szn πŸŽ€ this one came from the source ./drivers/base/power, dated October 2026 β€” slay, go forth and add your requests responsibly βœ¨πŸ‘‘

πŸ“¦ where this page comes from