of_dma_router_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the dma_spec for the DMA controller to use, and set up the requested route. big responsibilities, no cap. πŸ”₯
  • dma_router β€” pointer to the dma_router structure, 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