[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vc84jTQmTo7sb9sohkG0LmZmQX+hDimwCUb89vqmGfdcA@mail.gmail.com>
Date: Mon, 4 Jul 2022 23:56:41 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Marcus Folkesson <marcus.folkesson@...il.com>
Cc: Kent Gustavsson <kent@...oris.se>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-iio <linux-iio@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
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@...il.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
Powered by blists - more mailing lists