ufshcd_uic_pwr_ctrl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ufshcd_uic_pwr_ctrl(9) πŸ’–

okay bestie, this page is from the Kernel API Manual, and it's all about executing UIC commands that change the link power state and then waiting for that change to actually take effect. no vibes-based guessing here. ✨

πŸŽ€ NAME πŸŽ€

ufshcd_uic_pwr_ctrl β€” executes UIC commands (which affects the link power state) and waits for it to take effect. periodt. πŸ’…

🌸 SYNOPSIS 🌸

int ufshcd_uic_pwr_ctrl (struct ufs_hba *hba , struct uic_command *cmd
);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • hba β€” per adapter instance. it's giving "which UFS host are we talking about" energy. πŸ‘‘
  • cmd β€” UIC command to execute. this is the actual command bestie. πŸ’…

✨ DESCRIPTION ✨

okay so here's the lore 😭: DME operations like DME_SET(PA_PWRMODE), DME_HIBERNATE_ENTER & DME_HIBERNATE_EXIT commands take some time to take effect on both host and device UniPro link. because of that, their final completion is indicated by dedicated status bits in the Interrupt Status register (UPMS, UHES, UHXS) in addition to the normal UIC command completion Status (UCCS). this function only returns after the relevant status bits indicate the completion. literally it waits for the actual status bits to say "done" before it comes back. 🫢

πŸ”₯ RETURN πŸ”₯

0 on success, non-zero value on failure. slay if it's zero, go debug if it's not. 😭

🌈 SEE ALSO 🌈

first up, the kernel file: ./drivers/ufs/core/ufshcd.c β€” source-of-truth energy. πŸ‘‘

then the whole bestie list, every single one, no skips:


okay that's the whole page, bestie. source/version vibes: ./drivers/ufs/core, and the date on this one is October 2026. now go make that UFS link behave. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from