devm_iio_dm..._with_handle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ devm_iio_dmaengine_buffer_setup_with_handle(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's a little function from the kernel with a very long name, but don't panic β€” it's actually super straightforward. Let's get into it 🫢


🌸 NAME 🌸

devm_iio_dmaengine_buffer_setup_with_handle β€” literally just sets up a DMA buffer for an IIO device. That's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int devm_iio_dmaengine_buffer_setup_with_handle (struct device *dev ,
       struct iio_dev *indio_dev , struct dma_chan *chan , enum
       iio_buffer_direction dir );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device that gives you devm ownership (i.e. the managed-lifetime situation, so you don't have to manually free it later β€” iconic behavior tbh)
  • indio_dev β€” the IIO device this buffer is getting attached to πŸ“
  • chan β€” the DMA channel. your DMA channel. go get it, main character πŸ’…
  • dir β€” the direction of the buffer, in or out. pick a lane bestie ✨

🌈 DESCRIPTION 🌈

So what actually happens here? It allocates a brand-new IIO buffer using devm_iio_dmaengine_buffer_alloc, then attaches that buffer to an IIO device using iio_device_attach_buffer. Two steps, both handled. slay πŸ”₯

It also appends the INDIO_BUFFER_HARDWARE mode to the supported modes of the IIO device β€” so the device officially supports that mode now. periodt πŸ‘‘

And the tea β˜•: this is the same as devm_iio_dmaengine_buffer_setup_ext, the one difference being that the caller manages requesting and releasing the DMA channel handle themselves. that's it, that's the whole distinction, no cap πŸ’€


⭐ SEE ALSO ⭐


and that's the page bestie 🌸 this gem lives over in ./drivers/iio/buffer, dated October 2026, and it's part of the Kernel API Manual β€” the same page title we opened with, devm_iio_dm..._with_handle(9), coming right back around at the end like a true full-circle moment πŸŽ€πŸ’œ love that for us, mwah πŸ’‹

πŸ“¦ where this page comes from