ufs_mtk_clk_scale(9)
π ufs_mtk_clk_scale β a kernel API manual moment (section 9, bestie)
okay so welcome to the group chat, the function we're all here for is ufs_mtk_clk_scale and she is literally the internal clk scaling operation. internal!! she works behind the scenes, no cap β¨
β¨ NAME β¨
ufs_mtk_clk_scale β Internal clk scaling operation
like, she scales clocks. internally. that's the whole vibe π°οΈ
π SYNOPSIS π
void ufs_mtk_clk_scale (struct ufs_hba *hba , bool scale_up );
returns nothing (void, she's humble like that), takes two things and pops off π
π¦ ARGUMENTS π¦
hbaβ per adapter instance. that's your adapter girly, one per instance, you know the drill πscale_upβTruefor scaling up andfalsefor scaling down. yes bestie, up vs down, the classic binary of it all πΌ
πΈ DESCRIPTION πΈ
okay so here's the tea, and I need you to listen β
The MTK platform supports clk scaling by switching the parent of ufs_sel(mux). mux drama, but make it silicon.
The ufs_sel is downstream to ufs_ck, which feeds directly into the UFS hardware. direct line, no middleman, icon behaviour π
The max and min clocks rate of ufs_sel defined in dts should match the rate of "ufs_sel_max_src" and "ufs_sel_min_src" respectively. respectively!!! match them up, don't be messy π
why do we care, you ask? because this prevents changing the rate of the pll clock that is shared between modules. shared clock = shared custody, and we do not touch it π«Ά
π₯ SEE ALSO π₯
Kernel file ./drivers/ufs/host/ufs-mediatek.c, plus her whole friend group:
go read them, iykyk πβ¨
and that's the page!! this little manual lives under ./drivers/ufs/host β version vibes from October 2026, manual section 9, ufs_mtk_clk_scale(9) and all her glory ππ mwah, slay, periodt π
π¦ 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