of_dma_xlate_by_chan_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_dma_xlate_by_chan_id(9) πŸ’…

okay bestie, this is the of_dma_xlate_by_chan_id(9) page from the Kernel API Manual, and it's lowkey iconic. stay with me.

🌸 NAME 🌸

of_dma_xlate_by_chan_id β€” Translate dt property to DMA channel by channel id. periodt.

πŸ¦‹ SYNOPSIS πŸ¦‹

struct dma_chan * of_dma_xlate_by_chan_id (struct of_phandle_args
*dma_spec , struct of_dma *ofdma );

πŸŽ€ ARGUMENTS πŸŽ€

  • dma_spec β€” pointer to DMA specifier as found in the device tree. That's the main character input, fr fr.
  • ofdma β€” pointer to DMA controller data. Also essential, no cap.

πŸ’… DESCRIPTION πŸ’…

This function can be used as the of xlate callback for a DMA driver that wants to match the channel based on the channel id. it's giving "match by id" energy.

When using this xlate function, the #dma-cells property of the DMA controller dt node needs to be set to 1. not 2, not vibes β€” literally 1. πŸ™ˆ

The data parameter of of_dma_controller_register must be a pointer to the dma_device struct the function should match upon. highkey important, bestie.

Returns pointer to appropriate dma channel on success or NULL on error. slay on success, NULL when it's not giving. 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/dma/of-dma.c and the whole squad:


made with πŸ’– from ./drivers/dma, October 2026 β€” periodt.

πŸ“¦ where this page comes from