linux-stable/include/linux/iio
Mihail Chindris 9eeee3b0bf iio: Add output buffer support
Currently IIO only supports buffer mode for capture devices like ADCs. Add
support for buffered mode for output devices like DACs.

The output buffer implementation is analogous to the input buffer
implementation. Instead of using read() to get data from the buffer write()
is used to copy data into the buffer.

poll() with POLLOUT will wakeup if there is space available.

Drivers can remove data from a buffer using iio_pop_from_buffer(), the
function can e.g. called from a trigger handler to write the data to
hardware.

A buffer can only be either a output buffer or an input, but not both. So,
for a device that has an ADC and DAC path, this will mean 2 IIO buffers
(one for each direction).

The direction of the buffer is decided by the new direction field of the
iio_buffer struct and should be set after allocating and before registering
it.

Co-developed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Co-developed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Mihail Chindris <mihail.chindris@analog.com>
Link: https://lore.kernel.org/r/20211007080035.2531-2-mihail.chindris@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-19 08:30:44 +01:00
..
accel
adc iio: adc: ad_sigma_delta: remove ad_sd_{setup,cleanup}_buffer_and_trigger() 2021-06-13 17:00:17 +01:00
common iio: st_sensors: remove reference to parent device object on st_sensor_data 2021-09-14 12:00:32 +01:00
dac dt-bindings:iio:dac: update microchip,mcp4725.yaml reference 2021-04-07 08:36:38 +01:00
frequency
gyro
imu iio: adis: handle devices that cannot unmask the drdy pin 2021-10-19 08:27:34 +01:00
timer
buffer-dma.h
buffer-dmaengine.h iio: buffer-dma,adi-axi-adc: introduce devm_iio_dmaengine_buffer_setup() 2021-03-11 20:47:02 +00:00
buffer.h iio: Add output buffer support 2021-10-19 08:30:44 +01:00
buffer_impl.h iio: Add output buffer support 2021-10-19 08:30:44 +01:00
configfs.h
consumer.h iio: Provide iio_read_channel_processed_scale() API 2021-03-25 19:13:51 +00:00
driver.h iio: inkern: introduce devm_iio_map_array_register() short-hand function 2021-10-19 08:27:34 +01:00
events.h
hw-consumer.h
iio-opaque.h iio: core: Introduce iio_push_to_buffers_with_ts_unaligned() 2021-10-19 08:29:22 +01:00
iio.h iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
kfifo_buf.h iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant 2021-03-25 19:13:52 +00:00
machine.h
sw_device.h
sw_trigger.h
sysfs.h iio: add reference to iio buffer on iio_dev_attr 2021-03-11 20:47:04 +00:00
trigger.h iio: set default trig->dev.parent 2021-03-25 19:13:50 +00:00
trigger_consumer.h iio: Add __printf() attributes to various allocation functions 2020-09-21 18:54:18 +01:00
triggered_buffer.h iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants 2020-11-21 14:53:09 +00:00
triggered_event.h
types.h iio:event: Add timeout event info type 2021-04-07 08:36:36 +01:00