of_dma_router_register(9)
π of_dma_router_register β a Kernel API Manual moment, but make it group chat
okay so bestie, welcome to of_dma_router_register(9) β the Kernel API Manual page that's literally about registering a DMA router to the DT DMA helpers as a controller. Yes, that's the whole name, yes it's a mouthful, no we're not renaming it. π
β¨ NAME β¨
of_dma_router_register β register a DMA router to DT DMA helpers as a controller. it's giving "I put the router on the map", fr fr π
π¦ SYNOPSIS π¦
int of_dma_router_register (struct device_node *np , void
*(*of_dma_route_allocate) (struct of_phandle_args *, struct of_dma *) ,
struct dma_router *dma_router );
look at her. iconic signature. not one character changed, and we're keeping all those little spaces before the commas because that's just how she serves. π
πΈ ARGUMENTS πΈ
npβ the device node of the DMA router. like, which router are we talking about, bestie? this one. π«Άof_dma_route_allocateβ the setup function for the router. lowkey the main character here: it needs to modify thedma_specfor the DMA controller to use, and set up the requested route. big responsibilities, no cap. π₯dma_routerβ pointer to thedma_routerstructure, and it gets used when the route needs to be freed up later. the cleanup crew. we love her. π
π DESCRIPTION π
So like β this returns 0 on success, or an appropriate errno value on error. that's it, that's the vibe check. β¨
β οΈ important bestie note: allocated memory should be freed with the appropriate of_dma_controller_free call. don't just leave it there, that's not slay behaviour, that's a leak. π
π SEE ALSO π
Kernel file ./drivers/dma/of-dma.c β go read the source, iykyk π§
of_dma_find_controller(9)of_dma_router_xlate(9)of_dma_controller_register(9)of_dma_controller_free(9)of_dma_match_channel(9)of_dma_request_slave_channel(9)of_dma_simple_xlate(9)of_dma_xlate_by_chan_id(9)
π sign-off π
and that's the page!! brought to you by the fine people at ./drivers/dma, dated October 2026 β so you know it's fresh. go register your router, free your memory, and stan DMA. periodt. π
πβ¨π¦πΈπ«Ά
π¦ 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