[PATCH clk-fixes v1 0/2] Fix clk-composite to support .determine_rate

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sat Oct 16 03:50:20 PDT 2021


Alex reports [0] that commit 69a00fb3d69706 ("clk: divider: Implement
and wire up .determine_rate by default") breaks Rockchip platforms
because the parent is not considered anymore. This is because
clk-composite skips the "best parent" selection when
rate_ops.determine_rate is set. Above commit does this by adding
clk_divider_ops.determine_rate by default (then the Rockchip platform
drivers are using clk_divider_ops as rate_ops in clk-composite).

With these two patches a revert of above commit is not needed anymore
(which would result in a revert of five follow-up commits as well).
Instead the first patch changes the order so clk_divider_ops which
has both, .determine_rate and .round_rate are supported by clk-divider
(again).
The second patch makes clk-composite use (and even prefer)
rate_ops.determine_rate when available.

Special thanks to Alex for his patience and helping test these patches
off-list (since I don't have any board with Rockchip SoC).

At least the first patch should go into -fixes.


[0] https://lore.kernel.org/linux-clk/4eb964ac-4fff-b59d-2660-2f84d8af5901@gmail.com/


Martin Blumenstingl (2):
  clk: composite: Also consider .determine_rate for rate + mux
    composites
  clk: composite: Use rate_ops.determine_rate when also a mux is
    available

 drivers/clk/clk-composite.c | 76 +++++++++++++++++++++++++------------
 1 file changed, 52 insertions(+), 24 deletions(-)

-- 
2.33.1




More information about the linux-arm-kernel mailing list