STRUCT DMA_CHAN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 struct dma_chan(9) πŸŒˆπŸ’…

okay so bestie, this is literally the Kernel API Manual page for struct dma_chan(9) β€” and the whole vibe is β€œdevices supply DMA channels, clients use them” ✨ no cap. It’s a kernel struct, it’s iconic, and we’re gonna walk through every single member like it’s a group-chat roll call 🫢


✨ NAME ✨

struct dma_chan β€” devices supply DMA channels, and clients use them πŸŽ€ periodt.


πŸ’– SYNOPSIS πŸ’–

       struct dma_chan {
           struct dma_device *device;
           struct device *slave;
           dma_cookie_t cookie;
           dma_cookie_t completed_cookie;
           spinlock_t lock;
           int chan_id;
           struct dma_chan_dev *dev;
           const char *name;
         #ifdef CONFIG_DEBUG_FS;
           char *dbg_client_name;
         #endif;
           struct list_head device_node;
           struct dma_chan_percpu __percpu *local;
           int client_count;
           int table_count;
           struct dma_router *router;
           void *route_data;
           void *private;
        };

🌸 Members 🌸

  • device β€” ptr to the DMA device that supplies this channel, and it is always !NULL β€” no cap, bestie πŸ’…
  • slave β€” ptr to the device using this channel 🫢
  • cookie β€” last cookie value returned to the client πŸͺ
  • completed_cookie β€” last completed cookie for this channel βœ…
  • lock β€” protects between config and prepare-transfer when the driver has not implemented the device_prep_config_sg callback πŸ”’
  • chan_id β€” channel ID for sysfs πŸ†”
  • dev β€” class device for sysfs πŸ“
  • name β€” backlink name for sysfs 🏷️
  • dbg_client_name β€” slave name for debugfs, in the format dev_name(requester's dev):channel name, for example: "2b00000.mcasp:tx" β€” this one lives under #ifdef CONFIG_DEBUG_FS; in the struct πŸ›
  • device_node β€” used to add this to the device chan list πŸ”—
  • local β€” per-cpu pointer to a struct dma_chan_percpu ⚑
  • client_count β€” how many clients are using this channel πŸ‘₯
  • table_count β€” number of appearances in the mem-to-mem allocation table πŸ“Š
  • router β€” pointer to the DMA router structure πŸ›°οΈ
  • route_data β€” channel specific data for the router 🧭
  • private β€” private data for certain client-channel associations πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹


that’s the whole page, bestie β€” source/version: ./include/linux, date: October 2026, signed: struct dma_chan(9) πŸ’– slay and bye ✨

πŸ“¦ where this page comes from