lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 08/10] iio: adc: mcp3911: add support for phase
On Thu, Jun 23, 2022 at 7:42 PM Marcus Folkesson
<marcus.folkesson@gmail.com> 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

\
 
 \ /
  Last update: 2022-06-23 21:36    [W:0.175 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site