ufs_qcom_dou...apt_l0l1l2l3(9)
π
ufs_qcom_double_t_adapt_l0l1l2l3(9) β Kernel API Manual π¦
okay so bestie, welcome to the ufs_qcom_dou...apt_l0l1l2l3(9) page π this is a kernel API manual and honestly it's giving "niche M-PHY math but make it fashion." sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
ufs_qcom_double_t_adapt_l0l1l2l3 β literally makes a brand new adapt that doubles the adaptation duration TADAPT_L0_L1_L2_L3, and it derives that new one from the old adapt. no cap. π«Ά
πΈ SYNOPSIS πΈ
u32 ufs_qcom_double_t_adapt_l0l1l2l3 (u32 old_adapt );
π ARGUMENTS π
old_adaptβ the originalADAPT_L0_L1_L2_L3capability. this is the "before" picture, the starting point, the pre-glow-up era π
π₯ DESCRIPTION π₯
so here's the ADAPT_length_L0_L1_L2_L3 formula straight from the M-PHY spec, and yes it's exactly this, don't @ me:
if (ADAPT_range_L0_L1_L2_L3 == COARSE) { ADAPT_length_L0_L1_L2_L3 = [0, 12]
ADAPT_L0_L1_L2_L3 = 215 x 2^ADAPT_length_L0_L1_L2_L3 } else if
(ADAPT_range_L0_L1_L2_L3 == FINE) { ADAPT_length_L0_L1_L2_L3 = [0, 127]
TADAPT_L0_L1_L2_L3 = 215 x (ADAPT_length_L0_L1_L2_L3 + 1) }
okay and now, to actually double the adaptation duration TADAPT_L0_L1_L2_L3, it's a two-step situation π
- If the adapt range is
COARSE(1'b1), new adapt = old adapt + 1. simple. iconic. no notes. β¨ - If the adapt range is
FINE(1'b0), it splits into two vibes:- a) If the old adapt length is < 64, then
(new adapt + 1) = 2 * (old adapt + 1). math is mathing π - b) If the old adapt length is >= 64, set new adapt to
0x88usingCOARSErange β because the new adapt you'd get from the equation in a) shall exceed 127 π so yeah, we pivot. main character pivot energy.
- a) If the old adapt length is < 64, then
π EXAMPLES π
ADAPT_range_L0_L1_L2_L3 | ADAPT_length_L0_L1_L2_L3 | TADAPT_L0_L1_L2_L3
(PAM-4 UI) 0 3 131072 0
7 262144 0 63
2097152 0 64 2129920 0
127 4194304 1 8
8388608 1 9 16777216 1
10 33554432 1 11
67108864 1 12 134217728
(that's the table, verbatim, exactly as delivered β do not reformat, she's perfect as she is π)
β RETURN β
new adapt. that's it. that's the return. π«‘
π SEE ALSO π
Kernel file ./drivers/ufs/host/ufs-qcom.c π
then the whole friend group:
ufs_qcom_config_ice_allocator(9)ufs_qcom_cfg_timers(9)ufs_qcom_advertise_quirks(9)ufs_qcom_setup_clocks(9)ufs_qcom_init(9)ufs_qcom_set_clk_40ns_cycles(9)ufs_qcom_device_reset(9)ufs_qcom_fw_managed_device_reset(9)ufs_qcom_probe(9)ufs_qcom_remove(9)
aaaand that's the page!! π§ from ./drivers/ufs/host, dated October 2026, answering to the name ufs_qcom_dou...apt_l0l1l2l3(9). go double that adapt duration bestie, you got this ππΈβ¨
π¦ 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