Thread (1 message) 1 message, 1 author, 2022-11-05

Re: [PATCH v2 42/65] rtc: sun6i: Add a determine_rate hook

From: Samuel Holland <samuel@sholland.org>
Date: 2022-11-05 03:45:18
Also in: linux-clk, linux-rtc, linux-sunxi, lkml

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help