[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87edkzqeak.fsf@oltmanns.dev>
Date: Sun, 23 Jul 2023 09:26:27 +0200
From: Frank Oltmanns <frank@...manns.dev>
To: Maxime Ripard <mripard@...nel.org>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Andre Przywara <andre.przywara@....com>,
Roman Beranek <me@...y.cz>, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 07/11] clk: sunxi-ng: nm: Support finding closest rate
On 2023-07-17 at 16:12:30 +0200, Maxime Ripard <mripard@...nel.org> wrote:
> [[PGP Signed Part:Undecided]]
> On Mon, Jul 17, 2023 at 03:34:31PM +0200, Frank Oltmanns wrote:
>> Use the helper function ccu_is_better_rate() to determine the rate that
>> is closest to the requested rate, thereby supporting rates that are
>> higher than the requested rate if the clock uses the
>> CCU_FEATURE_CLOSEST_RATE.
>>
>> Add the macro SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST which
>> sets CCU_FEATURE_CLOSEST_RATE.
>>
>> To avoid code duplication, add the macros
>> SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_FEAT that allows selecting
>> arbitrary features and use it in the original
>> SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX as well as the newly introduced
>> SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST macros.
>>
>> Signed-off-by: Frank Oltmanns <frank@...manns.dev>
>> ---
>> drivers/clk/sunxi-ng/ccu_nm.c | 11 ++++------
>> drivers/clk/sunxi-ng/ccu_nm.h | 48 ++++++++++++++++++++++++++++++++++++++++---
>> 2 files changed, 49 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/clk/sunxi-ng/ccu_nm.c b/drivers/clk/sunxi-ng/ccu_nm.c
>> index c1fd11542c45..35d00783d748 100644
>> --- a/drivers/clk/sunxi-ng/ccu_nm.c
>> +++ b/drivers/clk/sunxi-ng/ccu_nm.c
>> @@ -28,7 +28,7 @@ static unsigned long ccu_nm_calc_rate(unsigned long parent,
>> }
>>
>> static unsigned long ccu_nm_find_best(unsigned long parent, unsigned long rate,
>> - struct _ccu_nm *nm)
>> + struct _ccu_nm *nm, struct ccu_common *common)
>
> The common pointer must be the first argument.
>
Same question as for patch 08: Should I also pull *nm to the beginning?
If so, do you have a preference on the order of *nm and *common?
Thanks,
Frank
>
> Once fixed,
> Acked-by: Maxime Ripard <mripard@...nel.org>
>
> Maxime
>
> [[End of PGP Signed Part]]
Powered by blists - more mailing lists