summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-02-07 17:38:39 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-04-10 18:25:46 +0300
commitf67c6c73cb07a4778425a2064640333ef7bfa42b (patch)
tree552d8976cbd3716475994464c0e503459f4e3306 /drivers/iio/adc
parent51570c9d4b3a678f77a50ac139f67290e946ec86 (diff)
downloadlinux-f67c6c73cb07a4778425a2064640333ef7bfa42b.tar.xz
iio: core: Simplify the registration of kfifo buffers
Among all the users of the kfifo buffers, no one uses the INDIO_BUFFER_HARDWARE mode. So let's take this as a general rule and simplify a little bit the internals - overall the documentation - by eliminating unused specific cases. Use the INDIO_BUFFER_SOFTWARE mode by default with kfifo buffers, which will basically mimic what all the "non direct" modes do. Cc: Benson Leung <bleung@chromium.org> Cc: Guenter Roeck <groeck@chromium.org> Cc: Jyoti Bhayana <jbhayana@google.com> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20220207143840.707510-13-miquel.raynal@bootlin.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/ina2xx-adc.c1
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
index 8d902a32a0fd..08a2c547f0b3 100644
--- a/drivers/iio/adc/ina2xx-adc.c
+++ b/drivers/iio/adc/ina2xx-adc.c
@@ -1027,7 +1027,6 @@ static int ina2xx_probe(struct i2c_client *client,
indio_dev->name = id->name;
ret = devm_iio_kfifo_buffer_setup(&client->dev, indio_dev,
- INDIO_BUFFER_SOFTWARE,
&ina2xx_setup_ops);
if (ret)
return ret;
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index dbdc1ef48566..567d43a30955 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -376,9 +376,7 @@ static int tiadc_iio_buffered_hardware_setup(struct device *dev,
{
int ret;
- ret = devm_iio_kfifo_buffer_setup(dev, indio_dev,
- INDIO_BUFFER_SOFTWARE,
- setup_ops);
+ ret = devm_iio_kfifo_buffer_setup(dev, indio_dev, setup_ops);
if (ret)
return ret;