mtk_infracf...s_protection(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 by regmap_update_bits with the enable register (PROTECTEN), or by regmap_write with 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