STRUCT SHDMA_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct shdma_ops(9) ✨

okay so this is from the Kernel API Manual and it's literally the whole vibe of "simple DMA driver operations" πŸ’… like if you've ever wondered what a DMA driver has to bring to the group chat, it's this struct, and she does not come to play.


🌸 SYNOPSIS 🌸

bestie, here's the whole squad, character for character, no cap:

struct shdma_ops {
    bool (*desc_completed)(struct shdma_chan *, struct shdma_desc *);
    void (*halt_channel)(struct shdma_chan *);
    bool (*channel_busy)(struct shdma_chan *);
    dma_addr_t (*slave_addr)(struct shdma_chan *);
    int (*desc_setup)(struct shdma_chan *, struct shdma_desc *,
dma_addr_t, dma_addr_t, size_t *);
    int (*set_slave)(struct shdma_chan *, int, dma_addr_t, bool);
    int (*setup_xfer)(struct shdma_chan *, int);
    void (*start_xfer)(struct shdma_chan *, struct shdma_desc *);
    struct shdma_desc *(*embedded_desc)(void *, int);
    bool (*chan_irq)(struct shdma_chan *, int);
    size_t (*get_partial)(struct shdma_chan *, struct shdma_desc *);
 };

like yes, that's a lot of function pointers, but she's organized πŸŽ€


πŸ¦‹ Members πŸ¦‹

  • desc_completed β€” returns true if this is the descriptor that just has completed. this one's atomic, so don't be weird about it 😭
  • halt_channel β€” stop DMA channel operation. also atomic. she stops, she doesn't negotiate πŸ’…
  • channel_busy β€” returns true if the channel is busy. atomic, obviously, because asking "are you busy" while stuff is happening is the whole point
  • slave_addr β€” returns the slave DMA address. no drama, just the address 🫢
  • desc_setup β€” sets up the hardware specific descriptor portion. atomic! hardware-specific means hardware-specific, don't come for her
  • set_slave β€” binds the channel to a slave. it's giving commitment ✨
  • setup_xfer β€” configures the channel hardware for operation. atomic ⚑
  • start_xfer β€” starts the DMA transfer. atomic. and then she goes πŸƒβ€β™€οΈπŸ’¨
  • embedded_desc β€” returns the Nth struct shdma_desc pointer from the descriptor array. Nth, bestie, count them properly πŸ”’
  • chan_irq β€” processes channel IRQ, returns true if a transfer has completed. atomic 🌈
  • get_partial β€” wait, hold on πŸ™ˆ
ok so real talk, get_partial is listed in the members of the synopsis, but the original page gives her no one-liner description. so she's just standing there, iconic and mysterious, minding her own business. no invented facts, no cap πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./include/linux/shdma-base.h
  • enum shdma_pm_state(9)

πŸŽ€ sign-off πŸŽ€

that's the whole page, bestie β€” sourced from ./include/linux, dated October 2026, filed under struct shdma_ops(9). go forth and slay your DMA ops πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from