cmdq_pkt_write_subsys(9)
β¨ cmdq_pkt_write_subsys(9) β¨
okay bestie sit down because we're diving into the Kernel API Manual and today's main character is cmdq_pkt_write_subsys π
she appends a write command to the CMDQ packet with subsys, and honestly? iconic behavior.
πΈ NAME πΈ
cmdq_pkt_write_subsys β append write command to the CMDQ packet with subsys π
π¦ SYNOPSIS π¦
int cmdq_pkt_write_subsys (struct cmdq_pkt *pkt , u8 subsys , u32
pa_base , u16 offset , u32 value );
like, look at her go β¨ five parameters, zero drama, all business.
π ARGUMENTS π
pktβ the CMDQ packet, aka the whole vibe container we're writing into π«Άsubsysβ the CMDQ sub system code, it's giving "which subsystem are we talking to" energypa_baseβ unused parameter π literally does nothing here, she's just here for the aesthetic, no capoffsetβ register offset from CMDQ sub system, so like... where in the subsystem we're aiming βvalueβ the specified target register value, the actual thing you want to put there π
π₯ RETURN π₯
0 for success; else the error code is returned π so like, check your return values bestie, don't just ignore them fr fr.
ngl this is the part where you actually look at what came back. zero means slay, anything else means something went sideways.
π SEE ALSO π
Kernel file ./include/linux/soc/mediatek/mtk-cmdq.h β go read it, it's the source of truth π§
the whole friend group, in order:
cmdq_dev_get_client_reg(9),cmdq_mbox_create(9),cmdq_mbox_destroy(9),cmdq_pkt_create(9),cmdq_pkt_destroy(9),cmdq_pkt_write(9),cmdq_pkt_write_pa(9),cmdq_pkt_write_mask(9),cmdq_pkt_write_mask_pa(9),cmdq_pkt_write_mask_subsys(9),cmdq_pkt_write_s(9),cmdq_pkt_write_s_mask(9),cmdq_pkt_write_s_value(9),cmdq_pkt_write_s_mask_value(9),cmdq_pkt_mem_move(9),cmdq_pkt_wfe(9),cmdq_pkt_acquire_event(9),cmdq_pkt_clear_event(9),cmdq_pkt_set_event(9),cmdq_pkt_poll(9),cmdq_pkt_poll_mask(9),cmdq_pkt_logic_command(9),cmdq_pkt_assign(9),cmdq_pkt_poll_addr(9),cmdq_pkt_jump_abs(9),cmdq_pkt_jump_rel(9),cmdq_pkt_jump_rel_temp(9),cmdq_pkt_eoc(9)
and that's the whole page, periodt π
this little cutie lives in ./include/linux/soc/mediatek and the version vibe is October 2026 β cmdq_pkt_write_subsys(9), 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