lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/5] iio: adc: mcp320x: remove device_index check for TX
On Wed, Aug 31, 2022 at 1:05 PM Vincent Whitchurch
<vincent.whitchurch@axis.com> wrote:
>
> Replace the device_index switch with a TX value computation based on the
> number of channels in the chip_info structure, so that the latter has
> all the information needed to handle the variants.

...

> return ((start_bit << 4) | (!differential << 3) |
> + (address << 2));

At the same time can be put on the above line and removed couple of ().

...

> return ((start_bit << 6) | (!differential << 5) |
> - (channel << 2));
> + (address << 2));

Ditto.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-08-31 14:44    [W:0.154 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site