ufshcd_scale_clks(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufshcd_scale_clks(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's about a lil function called ufshcd_scale_clks and honestly it's giving "clock glow-up energy" πŸ•πŸ’–


🌸 NAME 🌸

ufshcd_scale_clks β€” scale up or scale down UFS controller clocks ⏫⏬

like, literally the whole personality of this function is "make the clocks bigger" or "make the clocks smaller" and that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

int ufshcd_scale_clks (struct ufs_hba *hba , unsigned long freq , bool
       scale_up );

she takes three things and returns an int, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hba β€” per adapter instance πŸ’« this is the one and only adapter you're working with, your main character struct
  • freq β€” frequency to scale πŸ”₯ the number you're scaling to, obvious but we said it
  • scale_up β€” True if scaling up and false if scaling down ⬆️⬇️ like, this is the direction switch, the vibes selector, the whole "which way are we going" of it all

πŸ‘‘ RETURN πŸ‘‘

0 if successful; < 0 upon failure. πŸ’€

so yeah β€” zero is the slay outcome, anything less than zero means something went sideways and she's telling you about it 😭


🌈 SEE ALSO 🌈

the kernel file ./drivers/ufs/core/ufshcd.c and honestly the entire extended friend group 🫢 here's everybody, no one left behind, periodt:


and that's the whole page babes πŸ’œ go scale some clocks, drink water, and remember: 0 is the only return value that's invited to the party πŸŽ‰

mwah πŸ’‹ this page lives in ./drivers/ufs/core, dated October 2026, and it's part of the Kernel API Manual β€” see you in the group chat πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from