ufshcd_setu...adapt_length(9)
π ufshcd_setu...adapt_length(9) π
okay bestie, this one's from the Kernel API Manual β the title up top is truncated as ufshcd_setu...adapt_length(9), but the actual function is ufshcd_setup_tx_eqtr_adapt_length, and it's giving TX EQTR setup energy π let's go.
β¨ NAME β¨
ufshcd_setup_tx_eqtr_adapt_length β Setup TX adapt length for EQTR. periodt. π
π οΈ SYNOPSIS π οΈ
int ufshcd_setup_tx_eqtr_adapt_length (struct ufs_hba *hba , struct
ufshcd_tx_eq_params *params , u32 gear );
π«Ά ARGUMENTS π«Ά
hbaβ per adapter instance π«Ά like, one per adapter, bestie.paramsβ TX EQ parameters data structure πΈgearβ target gear for EQTR βοΈ
πΈ DESCRIPTION πΈ
This function determines and configures the proper TX adapt length (TAdapt) for the TX EQTR procedure based on the target gear and RX adapt capabilities of both host and device. no cap, it's literally doing the math so both sides vibe. π
Guidelines from MIPI UniPro v3.0 spec β select the minimum Adapt Length for the Equalization Training procedure based on the following conditions:
- If the target High-Speed Gear
nisHS-G4orHS-G5:PA_TxAdaptLength_EQTR[7:0] >= Max (10us, RX_HS_Gn_ADAPT_INITIAL_Capability, PA_PeerRxHsGnAdaptInitial)PA_TxAdaptLength_EQTR[7:0]shall be shorter thanPACP_REQUEST_TIMER(10ms)PA_TxAdaptLength_EQTR[15:8]is not relevant forHS-G4andHS-G5. This field is set to255(reserved value).
- If the target High-Speed Gear
nisHS-G6:PA_TxAdapthLength_EQTR >= 10usPA_TxAdapthLength_EQTR[7:0] >= Max (RX_HS_G6_ADAPT_INITIAL_Capability, PA_PeerRxHsG6AdaptInitialL0L3)PA_TxAdapthLength_EQTR[15:8] >= Max (RX_HS_G6_ADAPT_INITIAL_L0_L1_L2_L3_Capability, PA_PeerRxHsG6AdaptInitialL0L1L2L3)PA_TxAdaptLength_EQTRshall be shorter thanPACP_REQUEST_TIMERvalue of10ms.
Since adapt capabilities encode both range (fine/coarse) and length values, direct comparison is not possible. This function converts adapt capabilities to actual time durations in Unit Intervals (UI) using the Adapt time calculation formular in M-PHY v6.0 spec (Table 8), then selects the maximum to ensure both host and device use adequate TX adapt length. π§β¨
Returns 0 on success, negative error code otherwise. that's it, that's the return vibe π
π SEE ALSO π
Kernel file ./drivers/ufs/core/ufs-txeq.c and these besties:
ufshcd_configure_precoding(9)ufshcd_apply_tx_eq_settings(9)ufshcd_evaluate_tx_eqtr_fom(9)ufshcd_get_rx_fom(9)tx_eqtr_iter_try_update(9)tx_eqtr_iter_update(9)ufshcd_tx_eqtr_iter_init(9)adapt_cap_to_t_adapt(9)adapt_cap_to_t_adapt_l0l3(9)adapt_cap_to_t_adapt_l0l1l2l3(9)ufshcd_compose_tx_eqtr_setting(9)ufshcd_apply_tx_eqtr_settings(9)ufshcd_update_tx_eq_params(9)__ufshcd_tx_eqtr(9)ufshcd_tx_eqtr_prepare(9)ufshcd_tx_eqtr(9)ufshcd_config_tx_eq_settings(9)ufshcd_apply_valid_tx_eq_settings(9)ufshcd_retrain_tx_eq(9)ufshcd_extract_tx_eq_settings_attrs(9)ufshcd_update_tx_eq_settings_attrs(9)
Source/version is ./drivers/ufs/core, date is October 2026, and the page is ufshcd_setu...adapt_length(9) β bye bestie, slay that TX adapt length setup π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms