Messages in this thread | | | From | Andy Shevchenko <> | Date | Wed, 31 Aug 2022 15:42:54 +0300 | Subject | Re: [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
| |