cmdq_pkt_write_pa(9)
β¨ cmdq_pkt_write_pa(9) β¨
okay so bestie, this is a page from the Kernel API Manual π and honestly it's kind of a small icon β a little function that appends a write command to your CMDQ packet, but it does it with pa_base, which is the whole plot twist here. let's get into it π
πΈ NAME πΈ
cmdq_pkt_write_pa β append write command to the CMDQ packet with pa_base π«Ά
π¦ SYNOPSIS π¦
int cmdq_pkt_write_pa (struct cmdq_pkt *pkt , u8 subsys , u32 pa_base ,
u16 offset , u32 value );
likeβ¦ that's the whole signature, and yes the spacing is a little chaotic but she's iconic, we respect it π
π ARGUMENTS π
pktβ the CMDQ packet π this is your main character, the thing you're appending tosubsysβ unused parameter π literally not used, it's justβ¦ there. a decorative parameter. we still love herpa_baseβ the physical address base of the hardware register π this is the special sauce that makes this the_paversionoffsetβ register offset from CMDQ sub system βvalueβ the specified target register value π the actual thing you want written, bestie
π RETURN π
0 for success π β¦ and if it's not 0, then the error code is returned. so like, vibe check the return value ngl π
fr fr, don't ignore the return value. 0 = she slayed, anything else = something went sideways and you get an error code back.
π§ SEE ALSO π§
Kernel file ./include/linux/soc/mediatek/mtk-cmdq.h β that's the one, go look at it π
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_subsys(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)
likeβ¦ that's a whole friend group of functions and cmdq_pkt_write_pa is absolutely one of them, no cap π
and that's the page, bestie π sourced from ./include/linux/soc/mediatek, dated October 2026, and filed under cmdq_pkt_write_pa(9) β mwah, go write some registers responsibly π
β¨
π¦ 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