Re: [PATCH v2 2/5] iio: adc: mcp320x: remove device_index check for TX

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

 



On Wed, Aug 31, 2022 at 1:05 PM Vincent Whitchurch
<vincent.whitchurch@xxxxxxxx> 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



[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