mtk_infracf...s_protection(9)
π mtk_infracfg_set_bus_protection β the Kernel API Manual moment you've been waiting for
okay so bestie, welcome to section 9 of the Kernel API Manual π«Ά β yes we're doing kernel internals today, and yes it's gonna slay. The function we're stanning is mtk_infracfg_set_bus_protection (the page header truncates it all cute as mtk_infracf...s_protection(9), that's just the man page being dramatic about column width π).
β¨ NAME β¨
mtk_infracfg_set_bus_protection β enables bus protection. that's it, that's the whole vibe. it turns the protection on π₯
πΈ SYNOPSIS πΈ
int mtk_infracfg_set_bus_protection (struct regmap *infracfg , u32 mask
, bool reg_update );
like, it takes three things and gives you back an int. iconic signature honestly π
π ARGUMENTS π
infracfgβ the infracfg regmap. that's your regmap pointer, the whole reason we're here πmaskβ the mask containing the protection bits to be enabled. so like, the specific bits that are getting the protection glow-up β¨reg_updateβ a boolean flag, and she's the main character of the decision here: it determines whether to set the protection bits byregmap_update_bitswith the enable register (PROTECTEN), or byregmap_writewith the set register (PROTECTEN_SET). two paths, one flag, no cap π¦
π DESCRIPTION π
so what does she actually do?? this function enables the bus protection bits for disabled power domains β and the whole reason is so the system does not hang when some unit accesses the bus while in power down π like imagine the chaos. no thanks. so we protect the bus, we keep everything chill, we move on. periodt π
π SEE ALSO π
- Kernel file
./drivers/soc/mediatek/mtk-infracfg.cβ go read the source bestie, it's right there π mtk_infracfg_clear_bus_protection(9)β the other half of the story, the one that turns it back off β
and that's the page!! bye bestie, go protect a bus ππ§
this was brought to you by the fine folks at ./drivers/soc/mediatek, dated October 2026, in the Kernel API Manual β mwah, signing off π
π¦ 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