]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: at91: peripheral: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Mon, 11 Aug 2025 15:17:54 +0000 (11:17 -0400)
committerBrian Masney <bmasney@redhat.com>
Mon, 8 Sep 2025 13:41:25 +0000 (09:41 -0400)
commit9236145ffba286e819a37ce84c3b084127dfa208
tree9a4db45305ed0c538c0d5affb731d1a17cbe129e
parent47b13635dabc14f1c2fdcaa5468b47ddadbdd1b5
clk: at91: peripheral: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

This driver already has a clk_sam9x5_peripheral_determine_rate()
implementation, however it can change the parent rate. The existing
round rate does not have this functionality. I could add a check
for CLK_SET_RATE_PARENT, and combine the two functions, however there
are some other minor differences in the two implementations. I don't
have access to this particular hardware. I believe that they could
be combined, however it would need to be tested on real hardware.
So, let's play it safe and convert the existing round rate
implementation to ensure that the driver keeps the same functionality
as before.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
drivers/clk/at91/clk-peripheral.c