Re: [PATCH v5 05/20] iio: adc: Add AD7768 and AD7768-4 core support

From: Andy Shevchenko

Date: Tue Sep 01 2026 - 03:22:54 EST


On Mon, Aug 31, 2026 at 05:20:04PM +0200, Janani Sunil wrote:
> On 8/31/26 11:04, Andy Shevchenko wrote:
> > On Fri, Aug 28, 2026 at 05:30:28PM +0200, Janani Sunil wrote:

...

> > + dclk_div = 8 * st->datalines / st->chip_info->num_channels;
> > Does 8 represent BITS_PER_BYTE? Can BITS_TO_BYTES() be used?
>
> 8 is not BITS_PER_BYTE.
> With fast mode (fMOD = MCLK / 4) and ×64 decimation, this gives:
> MCLK / DCLK = (4 × 64 / 32) × data lines / channels
> Therefore, the factor is 8. I will add a comment explaining this.

Yes, please do. This will clarify the magic number.

--
With Best Regards,
Andy Shevchenko