ufshcd_negotiate_pwr_params(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ufshcd_negotiate_pwr_params(9) πŸ’–

okay bestie, welcome to the Kernel API Manual πŸŽ€ β€” yes that's the manual name, we're fancy here. Today's main character is ufshcd_negotiate_pwr_params, a lil function with a big job. Let's get into it ✨


🌸 NAME 🌸

ufshcd_negotiate_pwr_params β€” literally its whole thing is finding power mode settings that are supported by both the controller and the device 🫢 like a group chat where everybody has to agree on the plan or nobody's going anywhere.


✨ SYNOPSIS ✨

int ufshcd_negotiate_pwr_params (const struct ufs_host_params
*host_params , const struct ufs_pa_layer_attr *dev_max , struct
ufs_pa_layer_attr *agreed_pwr );

that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • host_params β€” pointer to host parameters πŸ‘‘ (the host's side of the story)
  • dev_max β€” pointer to device attributes 🌈 (the device's side of the story)
  • agreed_pwr β€” returned agreed attributes 🀝 (where the compromise gets written down β€” this is the main character of the output, honestly)

⭐ RETURN ⭐

0 on success πŸŽ‰ β€” and a non-zero value on failure 😭 no middle ground, it's giving pass/fail semester.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/ufs/host/ufshcd-pltfrm.c

and the whole friend group, fr fr:


🧚 tiny reminder: this page lives in ./drivers/ufs/host, dated October 2026, and it's page ufshcd_negotiate_pwr_params(9) of the Kernel API Manual β€” so if you're citing it, cite it cute πŸ’…

k bye bestie, go negotiate those power params, slay πŸ’–πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from