lkml.org 
[lkml]   [2022]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2022-07-04 23:59    [W:0.125 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site