Messages in this thread |  | | From | Andy Shevchenko <> | Date | Mon, 4 Jul 2022 23:56:41 +0200 | Subject | Re: [PATCH v3 5/9] iio: adc: mcp3911: add support for buffers |
| |
On Mon, Jul 4, 2022 at 7:20 PM Marcus Folkesson <marcus.folkesson@gmail.com> wrote: > > Add support for buffers to make the driver fit for more usecases.
use cases
...
> + for_each_set_bit(scan_index, indio_dev->active_scan_mask, > + indio_dev->masklength) { > + const struct iio_chan_spec *scan_chan = > + &indio_dev->channels[scan_index]; > + > + adc->scan.channels[i] = adc->rx_buf[scan_chan->channel * 3 + 0] << 16 | > + adc->rx_buf[scan_chan->channel * 3 + 1] << 8 | > + adc->rx_buf[scan_chan->channel * 3 + 2] << 0;
get_unaligned_be24()
> + i++; > + }
...
> @@ -325,6 +403,7 @@ static int mcp3911_probe(struct spi_device *spi) > if (ret) > return ret; > > + > indio_dev->name = spi_get_device_id(spi)->name; > indio_dev->modes = INDIO_DIRECT_MODE; > indio_dev->info = &mcp3911_info;
Stray change.
-- With Best Regards, Andy Shevchenko
|  |