STRUCT DW_DMA_SLAVE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct dw_dma_slave β€” Kernel API Manual ✨

okay so bestie, welcome to the <pink>Kernel API Manual</pink> entry for struct dw_dma_slave, and honestly? it's giving "small struct, big responsibilities" πŸ’…


🌸 NAME 🌸

struct dw_dma_slave β€” the controller-specific tea about a slave πŸ«–βœ¨ like, every slay detail the DMA controller needs to know about the peripheral it's about to serve.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct dw_dma_slave {
    struct device           *dma_dev;
    u8 src_id;
    u8 dst_id;
    u8 m_master;
    u8 p_master;
    u8 channels;
    bool hs_polarity;
 };

no cap, that's the whole shape of it πŸ‘‘ (and yes, keep the fields exactly like that, we do not freestyle struct definitions, that's how you end up crying at 3am 😭)


πŸ’– Members πŸ’–

  • dma_dev β€” the DMA master device. it's required, bestie, non-negotiable, the main character of this field list πŸ‘‘ if you skip it the whole vibe check fails.
  • src_id β€” the src request line. that's the line your source data rides in on, iconic little u8 πŸŽ€
  • dst_id β€” the dst request line. same energy, but for the destination side 🌈
  • m_master β€” the memory master for transfers on the allocated channel. literally who's carrying the memory-side of the transfer πŸ’Ύβœ¨
  • p_master β€” the peripheral master for transfers on the allocated channel. and this one's the peripheral-side counterpart, they're a matched set fr fr 🫢
  • channels β€” a mask of the channels permitted for allocation. and here's the cute part: a zero value means any channel 🌸 so zero isn't "none", it's "surprise me", lowkey iconic behaviour.
  • hs_polarity β€” sets active low polarity of the handshake interface. tiny bool, big mood, flip it and the handshake signal is active low πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/linux/platform_data/dma-dw.h
  • struct dw_dma_platform_data(9) β€” go read that one next, it's the sibling, iykyk πŸ’œ

and that's the page, bestie!! 🧚 source: ./include/linux/platform_data, dated October 2026 β€” mwah, go allocate some channels responsibly, struct dw_dma_slave(9) out πŸ’…β­πŸ’–

πŸ“¦ where this page comes from