diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2021-10-07 08:00:32 +0000 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-10-19 08:30:45 +0100 |
commit | c02cd5c19c17698f12b731e898127095f9bc2921 (patch) | |
tree | 55efe56945d53ab71aa107aa9f1493f661b0176f /drivers/iio/accel/adxl372.c | |
parent | 1546d6718dc92b27935931ee4e4c2e9893ef3066 (diff) | |
download | lwn-c02cd5c19c17698f12b731e898127095f9bc2921.tar.gz lwn-c02cd5c19c17698f12b731e898127095f9bc2921.zip |
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>
Diffstat (limited to 'drivers/iio/accel/adxl372.c')
-rw-r--r-- | drivers/iio/accel/adxl372.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c index fc9592407717..758952584f8c 100644 --- a/drivers/iio/accel/adxl372.c +++ b/drivers/iio/accel/adxl372.c @@ -1214,6 +1214,7 @@ int adxl372_probe(struct device *dev, struct regmap *regmap, ret = devm_iio_triggered_buffer_setup_ext(dev, indio_dev, NULL, adxl372_trigger_handler, + IIO_BUFFER_DIRECTION_IN, &adxl372_buffer_ops, adxl372_fifo_attributes); if (ret < 0) |