bcm2835_dma_create_cb_chain(9)
π bcm2835_dma_create_cb_chain(9) β the kernel API manual, bestie edition π
okay so this is the man page for bcm2835_dma_create_cb_chain(9), straight out of the Linux Kernel API Manual, and honestly? it's giving "let me build you a whole chain of control blocks real quick" energy. stay with me, we're gonna get through it together π«Ά
β¨ NAME β¨
bcm2835_dma_create_cb_chain β create a control block and fills data in π«
like, the whole job. makes the cb, drops the data inside. no cap.
πΈ SYNOPSIS πΈ
struct bcm2835_desc * bcm2835_dma_create_cb_chain (struct dma_chan *chan
, enum dma_transfer_direction direction , bool cyclic , u32 info , u32
finalextrainfo , size_t frames , dma_addr_t src , dma_addr_t dst ,
size_t buf_len , size_t period_len , gfp_t gfp );
she takes eleven arguments and returns a struct bcm2835_desc *. iconic behavior, honestly π
π¦ ARGUMENTS π¦
okay so here's the whole cast of characters, one by one, no skips, we're doing all of them:
chanβ thedma_chanthat we're running this whole thing for. main character, literally.directionβ the direction in which we transfer. which way the vibe is flowing πcyclicβ it is a cyclic transfer. bool, so it's a yes/no moment.infoβ the default info bits to apply per controlblock. the everyday fit, the baseline lewk.finalextrainfoβ additional bits in the last controlblock (or whenperiod_lenis reached in case of cyclic). the little sprinkle at the end β¨framesβ number of controlblocks to allocate. how many we're making, count it out πsrcβ thesrcaddress to assign (if theS_INCbit is set ininfo, then it gets incremented). yes, it moves β mind the bit, bestie.dstβ thedstaddress to assign (if theD_INCbit is set ininfo, then it gets incremented). same deal, other side π¦buf_lenβ the full buffer length (may also be0). zero is a valid vibe, no worries.period_lenβ the period length when to applyfinalextrainfoin addition to the last transfer; this will also break some controlblocks early. lowkey important: it β¨breaks things earlyβ¨ on purpose, that's the whole point, not a bug.gfpβ the GFP flag to use for allocation. the allocation mood ring π
π SEE ALSO π
go touch these files, iykyk:
- Kernel file
./drivers/dma/bcm2835-dma.c - struct
bcm2835_dmadev(9)
π«Ά the sign-off π«Ά
this beauty lives under ./drivers/dma, it's the October 2026 edition, and the page itself is filed as bcm2835_dma_create_cb_chain(9). go forth and chain those control blocks, bestie β slay ππ₯π
π¦ 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