Re: [PATCH v2 03/10] iio: adc: mcp3911: add support for buffers

Jonathan Cameron
2022-07-07T17:47:38Z

> > > static const struct iio_info mcp3911_info = {
> > > .read_raw = mcp3911_read_raw,
> > > .write_raw = mcp3911_write_raw,
> > > @@ -303,7 +353,7 @@ static int mcp3911_probe(struct spi_device *spi)
> > > goto clk_disable;
> > >
> > > indio_dev->name = spi_get_device_id(spi)->name;
> > > - indio_dev->modes = INDIO_DIRECT_MODE;
> > > + indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_TRIGGERED;
> >
> > The core sets INDIO_BUFFER_TRIGGERED as part of devm_iio_triggered_buffer_setup()
> > so you need to set DIRECT_MODE here (that one isn't visible to the core)
>
> Ok, thank you. I sent patches that fixes this in two other ADC-drivers
> as well to avoid more people following the same thing.

Thanks. Much appreciated!