ufshcd_set_clk_freq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ufshcd_set_clk_freq β€” Kernel API Manual, section 9 πŸ’–

okay so bestie, we're in the Kernel API Manual (section 9, the kernel-functions girlies ✨) and today's main character is ufshcd_set_clk_freq. She does exactly one thing and she does it iconically: she sets the UFS controller clock frequencies. that's it. that's the vibe. πŸŽ€


✨ NAME ✨

ufshcd_set_clk_freq β€” set UFS controller clock frequencies πŸ•°οΈπŸ’…


🌸 SYNOPSIS 🌸

int ufshcd_set_clk_freq (struct ufs_hba *hba , bool scale_up );

like, she takes two things and hands you back an int. no cap. πŸ¦‹


🧚 ARGUMENTS 🧚

  • hba β€” the per adapter instance, aka the UFS host bus adapter we're messing with. she's the whole point, be nice to her 🫢
  • scale_up β€” a bool, and it's giving "which direction tho?". If True, set max possible frequency; otherwise set low frequency. (the OG page spells it "othewise" β€” we love a typo queen, but yeah, it means otherwise πŸ™ˆ)

⭐ RETURN ⭐

  • 0 if successful ✨
  • < 0 upon failure 😭

that's it, that's the whole deal. zero is the slay outcome, negative is the "not me, not today" outcome πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

she does NOT come alone β€” this is a whole friend group, and the source file is ./drivers/ufs/core/ufshcd.c. lineup goes:

like I said. whole friend group. iykyk πŸ’œ


and that's the page, bestie 🫢 this one came out of ./drivers/ufs/core, dated October 2026 β€” go drink some water, your clock frequencies are iconic πŸ’–βœ¨

πŸ“¦ where this page comes from