Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: buffer-dmaengine: document iio_dmaengine_buffer_setup_ext

The iio_dmaengine_buffer_setup_ext() function is public and should be
documented. Also, while touching this, fix the description of @dev in
related functions. @dev does not strictly have to be the parent of the
IIO device. It is only passed to dma_request_chan() so strictly
speaking, it can be any device that is a valid DMA channel consumer.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241115-dlech-mainline-spi-engine-offload-2-v5-9-bea815bd5ea5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
a05dc8b4 df81f90c

+17 -2
+17 -2
drivers/iio/buffer/industrialio-buffer-dmaengine.c
··· 206 206 207 207 /** 208 208 * iio_dmaengine_buffer_alloc() - Allocate new buffer which uses DMAengine 209 - * @dev: Parent device for the buffer 209 + * @dev: DMA channel consumer device 210 210 * @channel: DMA channel name, typically "rx". 211 211 * 212 212 * This allocates a new IIO buffer which internally uses the DMAengine framework ··· 288 288 } 289 289 EXPORT_SYMBOL_NS_GPL(iio_dmaengine_buffer_free, "IIO_DMAENGINE_BUFFER"); 290 290 291 + /** 292 + * iio_dmaengine_buffer_setup_ext() - Setup a DMA buffer for an IIO device 293 + * @dev: DMA channel consumer device 294 + * @indio_dev: IIO device to which to attach this buffer. 295 + * @channel: DMA channel name, typically "rx". 296 + * @dir: Direction of buffer (in or out) 297 + * 298 + * This allocates a new IIO buffer with devm_iio_dmaengine_buffer_alloc() 299 + * and attaches it to an IIO device with iio_device_attach_buffer(). 300 + * It also appends the INDIO_BUFFER_HARDWARE mode to the supported modes of the 301 + * IIO device. 302 + * 303 + * Once done using the buffer iio_dmaengine_buffer_free() should be used to 304 + * release it. 305 + */ 291 306 struct iio_buffer *iio_dmaengine_buffer_setup_ext(struct device *dev, 292 307 struct iio_dev *indio_dev, 293 308 const char *channel, ··· 336 321 337 322 /** 338 323 * devm_iio_dmaengine_buffer_setup_ext() - Setup a DMA buffer for an IIO device 339 - * @dev: Parent device for the buffer 324 + * @dev: Device for devm ownership and DMA channel consumer device 340 325 * @indio_dev: IIO device to which to attach this buffer. 341 326 * @channel: DMA channel name, typically "rx". 342 327 * @dir: Direction of buffer (in or out)