ufs_mtk_setup_clocks(9)
π ufs_mtk_setup_clocks(9) π
okay so welcome to the Kernel API Manual bestie, today we're looking at ufs_mtk_setup_clocks(9) and honestly? it's giving "small function, big responsibilities". it does exactly one glamorous thing: turns clocks on and off. that's it. that's the gig. πβ¨
β¨ NAME β¨
ufs_mtk_setup_clocks β enables/disable clocks π
like yes the grammar is a little chaotic but the energy is correct, she enables AND she disables, an icon of duality π
πΈ SYNOPSIS πΈ
int ufs_mtk_setup_clocks (struct ufs_hba *hba , bool on , enum
ufs_notify_change_status status );
three arguments, one int return, zero drama (unless it returns non-zero, then there's some drama π)
π¦ ARGUMENTS π¦
hbaβ the host controller instance, aka the main character of this whole situation π this is the thing whose clocks you're messing with, so pls be normal about it.onβ iftrue, enable the clocks; else disable them. it's a bool, it's literally yes-or-no, no in-between, no "maybe", no "i'll decide later" πstatusβPRE_CHANGEorPOST_CHANGEnotify π£ which one you get depends on where in the change you are. before? after? she contains multitudes.
β RETURN β
0 on success, non-zero on failure. that's the whole deal. zero = slay, non-zero = something went sideways and you should probably look at it π₯
π SEE ALSO π
- Kernel file
./drivers/ufs/host/ufs-mediatek.cβ the actual source, go read her, she's right there π«Ά ufs_mtk_init_clocks(9)ufs_mtk_init(9)ufs_mtk_clk_scale(9)ufs_mtk_probe(9)ufs_mtk_remove(9)
the whole mediatek ufs friend group honestly, they all show up together, iykyk π§
lowkey reminder: this page is short because the function is short, not because i'm being lazy. every single detail is here. no cap. π
and that's the tea π this came to you from ./drivers/ufs/host, dated October 2026, and yes that's the actual footer energy, mwah πβ¨
π¦ 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