[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMe2N7B8XwUPXsEG@smile.fi.intel.com>
Date: Mon, 15 Sep 2025 09:46:15 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: David Lechner <dlechner@...libre.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/6] iio: adc: ad7124: add filter support
On Sat, Sep 13, 2025 at 02:42:00PM +0100, Jonathan Cameron wrote:
> On Fri, 12 Sep 2025 09:27:47 -0500
> David Lechner <dlechner@...libre.com> wrote:
> > On 9/11/25 11:49 PM, Andy Shevchenko wrote:
> > > On Fri, Sep 12, 2025 at 12:43 AM David Lechner <dlechner@...libre.com> wrote:
...
> > >> - factor = 32 * 4; /* N = 4 for default sinc4 filter. */
> > >> - odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * factor +
> > >> - odr_micro * factor / MICRO);
> > >> - odr_sel_bits = clamp(odr_sel_bits, 1, 2047);
> > >> + divisor = cfg->requested_odr * factor +
> > >> + cfg->requested_odr_micro * factor / MICRO;
> > >> + odr_sel_bits = clamp(DIV_ROUND_CLOSEST(fclk, divisor), 1, 2047);
> > >
> > > I have a déjà vu feeling here. Is this similar code to elsewhere? Can
> > > it be factored out to a helper?
> >
> > It is changing the same code from a previous commit, not duplicating
> > it. I guess I could have introduced the divisor variable in the
> > earlier commit and saved some churn.
> For this and the previous patch, to me it feels like we are letting
> aiming for perfect patch break up be the enemy of a good result.
> So I've applied them both but as I don't know if Andy will agree
> not his RB.
Even if I not agree, this is not a big deal. We can amend it in the future if
even needed. So, thanks!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists