Re: [PATCH v6 02/24] iio: kfifo: add devm_iio_kfifo_buffer_setup() helper

2021-02-28 Thread Alexandru Ardelean
On Sun, Feb 28, 2021 at 10:08 AM Lars-Peter Clausen wrote: > > On 2/15/21 11:40 AM, Alexandru Ardelean wrote: > > +int devm_iio_kfifo_buffer_setup(struct device *dev, > > + struct iio_dev *indio_dev, > > + int mode_flags, > > +

Re: [PATCH v6 02/24] iio: kfifo: add devm_iio_kfifo_buffer_setup() helper

2021-02-28 Thread Lars-Peter Clausen
On 2/15/21 11:40 AM, Alexandru Ardelean wrote: +int devm_iio_kfifo_buffer_setup(struct device *dev, + struct iio_dev *indio_dev, + int mode_flags, + const struct iio_buffer_setup_ops *setup_ops) +{ +

[PATCH v6 02/24] iio: kfifo: add devm_iio_kfifo_buffer_setup() helper

2021-02-15 Thread Alexandru Ardelean
This change adds the devm_iio_kfifo_buffer_setup() helper/short-hand, which groups the simple routine of allocating a kfifo buffers via devm_iio_kfifo_allocate() and calling iio_device_attach_buffer(). The mode_flags parameter is required, as the IIO kfifo supports 2 modes: INDIO_BUFFER_SOFTWARE