iio: triggered-buffer: extend support to configure output buffers
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 7 Oct 2021 08:00:32 +0000 (08:00 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:30:45 +0000 (08:30 +0100)
commitc02cd5c19c17698f12b731e898127095f9bc2921
tree55efe56945d53ab71aa107aa9f1493f661b0176f
parent1546d6718dc92b27935931ee4e4c2e9893ef3066
iio: triggered-buffer: extend support to configure output buffers

Now that output (kfifo) buffers are supported, we need to extend the
{devm_}iio_triggered_buffer_setup_ext() parameter list to take a direction
parameter.

This allows us to attach an output triggered buffer to a DAC device.
Unfortunately it's a bit difficult to add another macro to avoid changing 5
drivers where {devm_}iio_triggered_buffer_setup_ext() is used.
Well, it's doable, but may not be worth the trouble vs just updating all
these 5 drivers.

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-4-mihail.chindris@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl372.c
drivers/iio/accel/bmc150-accel-core.c
drivers/iio/adc/at91-sama5d2_adc.c
drivers/iio/buffer/industrialio-triggered-buffer.c
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
include/linux/iio/triggered_buffer.h