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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux