cmdq_pkt_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cmdq_pkt_write β€” like, the whole vibe ✨

okay so real talk, this page lives in the Kernel API Manual (section 9, iykyk) and it's all about cmdq_pkt_write β€” the function that literally just appends a write command to the CMDQ packet. that's it. that's the whole thing. she's simple, she's iconic, she does exactly one job and does it slayfully πŸ’–


✨ SYNOPSIS ✨

int cmdq_pkt_write (struct cmdq_pkt *pkt , u8 subsys , u16 offset , u32
value );

like yes bestie, that's the whole signature πŸŽ€ five things: a return type, a packet, a subsystem code, an offset, and the value. no notes. periodt.


🌸 ARGUMENTS 🌸

  • pkt β€” the CMDQ packet 🫢 this is the thing you're stuffing the write command into, bestie. giving main character energy, holding everyone else's commands.
  • subsys β€” the CMDQ sub system code 🌈 it's a u8, it tells the packet which subsystem you're talking to. think of it as the group chat you're posting in.
  • offset β€” register offset from the CMDQ sub system 🎯 a u16, relative to that subsystem. not the absolute address, just the offset from where the subsystem starts. lowkey important distinction ngl.
  • value β€” the specified target register value πŸ’œ a u32 β€” the actual data you want written. the moment. the payload. the reason we're all here.

πŸ”₯ RETURN πŸ”₯

0 for success πŸŽ‰ β€” and if it's not 0? then the error code is returned πŸ’€ so like, check it. don't just assume it ate. fr fr.


πŸ¦‹ SEE ALSO πŸ¦‹

okay this is the part where the manpage just goes off and lists literally the entire extended universe of CMDQ functions 😭 and honestly? we love a comprehensive friend group.

the Kernel file lives at ./include/linux/soc/mediatek/mtk-cmdq.h β€” that's the source of truth, go read it 🧚

and the whole squad, in order:

like, every single one of them. no skips. we respect the roster πŸ‘‘


aaaand that's the page!! sourced straight from ./include/linux/soc/mediatek, dated October 2026 ⭐ signing off bestie, go forth and append your writes responsibly πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from