Re: [PATCH v7 10/12] iio: adc: ad7768-1: replace manual attribute declaration

From: Andy Shevchenko
Date: Thu May 08 2025 - 15:31:32 EST


On Thu, May 08, 2025 at 02:05:13PM -0300, Jonathan Santos wrote:
> Use read_avail callback from struct iio_info to replace the manual
> declaration of sampling_frequency_available attribute.

...

> +static void ad7768_fill_samp_freq_tbl(struct ad7768_state *st)
> +{
> + unsigned int i;
> +
> + for (i = 0; i < ARRAY_SIZE(ad7768_clk_config); i++)
> + st->samp_freq_avail[i] = DIV_ROUND_CLOSEST(st->mclk_freq,
> + ad7768_clk_config[i].clk_div);

st->samp_freq_avail[i] =
DIV_ROUND_CLOSEST(st->mclk_freq, ad7768_clk_config[i].clk_div);

is slightly better formatting for this.

> +}


--
With Best Regards,
Andy Shevchenko