ufshcd_retrain_tx_eq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufshcd_retrain_tx_eq(9) β€” like, the Kernel API Manual page you didn't know you needed πŸŽ€

okay bestie, sit down, grab a strawberry πŸ“, because this is the page for ufshcd_retrain_tx_eq from the Kernel API Manual and it's honestly giving "small function, big vibes."


✨ NAME ✨

ufshcd_retrain_tx_eq β€” retrains your TX Equalization and then goes ahead and applies the new settings πŸ’… no cap, that's literally the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

int ufshcd_retrain_tx_eq (struct ufs_hba *hba , u32 gear );

like yes, that's it, that's the signature, copy it exactly, do not touch it πŸ™ˆ


🌸 ARGUMENTS 🌸

  • hba β€” the per-adapter instance. your lil adapter baby. the one and only 🫢
  • gear β€” the target High-Speed (HS) gear for retraining. this is the gear we're aiming at, bestie ⭐

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea πŸ‘‘: this function kicks off a refresh of the TX Equalization settings for one specific HS gear. it's not doing a little touch-up, it's doing the full routine:

  • it scales the clocks to maximum frequency β€” we're going full send on the clock speed ⚑
  • it negotiates the power mode with the device β€” gotta talk it out first, communication is key πŸ’–
  • it retrains TX EQ β€” the main character of this whole page tbh
  • and then it applies the new TX EQ settings by conducting a Power Mode change ✨

and the return? 0 on success, non-zero error code otherwise. periodt. if you get non-zero, something did not slay 😭


πŸ’œ SEE ALSO πŸ’œ

the whole friend group, iykyk 🌈. also heads up, this lives in the kernel file ./drivers/ufs/core/ufs-txeq.c:


anyway bestie, that's the page 🧚 this came out of ./drivers/ufs/core, dated October 2026, and it's the ufshcd_retrain_tx_eq(9) page from the Kernel API Manual πŸ’– go retrain something, you're gonna ate πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from