[<prev] [next>] [day] [month] [year] [list]
Message-ID: <81491c02-6c07-bf17-0a00-5c396f7878d6@sholland.org>
Date: Fri, 4 Nov 2022 22:45:05 -0500
From: Samuel Holland <samuel@...lland.org>
To: Maxime Ripard <maxime@...no.tech>, Stephen Boyd <sboyd@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Michael Turquette <mturquette@...libre.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Jernej Skrabec <jernej.skrabec@...il.com>
Cc: linux-clk@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 42/65] rtc: sun6i: Add a determine_rate hook
Hi Maxime,
On 11/4/22 08:17, Maxime Ripard wrote:
> The Allwinner sun6i RTC clock implements a mux with a set_parent hook,
> but doesn't provide a determine_rate implementation.
>
> This is a bit odd, since set_parent() is there to, as its name implies,
> change the parent of a clock. However, the most likely candidate to
> trigger that parent change is a call to clk_set_rate(), with
> determine_rate() figuring out which parent is the best suited for a
> given rate.
>
> The other trigger would be a call to clk_set_parent(), but it's far less
> used, and it doesn't look like there's any obvious user for that clock.
>
> So, the set_parent hook is effectively unused, possibly because of an
> oversight. However, it could also be an explicit decision by the
> original author to avoid any reparenting but through an explicit call to
> clk_set_parent().
For this driver, we always want to use the more accurate parent if it is
available. The driver enforces this in the probe function already, so I
think it would be better to just remove the .set_parent implementation.
Regards,
Samuel
Powered by blists - more mailing lists