Re: [PATCH 08/10] iio: adc: mcp3911: add support for phase

From: Andy Shevchenko
Date: Thu Jun 23 2022 - 15:34:39 EST


On Thu, Jun 23, 2022 at 7:42 PM Marcus Folkesson
<marcus.folkesson@xxxxxxxxx> wrote:
>
> The MCP3911 incorporates a phase delay generator,
> which ensures that the two ADCs are converting the
> inputs with a fixed delay between them.
> Expose it to userspace.

...

> + case IIO_CHAN_INFO_PHASE:
> + if (val2 != 0 || val > 0xfff) {

>= BIT(12) will show better the intention

> + ret = -EINVAL;
> + goto out;
> + }

...

> + ret = mcp3911_write(adc, MCP3911_REG_PHASE, val,
> + 2);

One line.

--
With Best Regards,
Andy Shevchenko