[PATCH] clk: fix clk_round_rate() behaviour

Денис Орлов denorl2009 at gmail.com
Thu May 19 01:12:37 PDT 2022


Hi,

On Mon, 16 May 2022 at 12:07, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> I smell problems with this patch. Which clocks do you have that do not
> have a round_rate hook but still allow to set its rate?

Well, the reason for making this patch was actually the lack of any
output from the clk_set_rate command if there was no set_rate (together
with round_rate) hook set for a given clock. In this case set_rate()
would check round_rate() to be equal to the current rate and leave
without returning an error. But I would like to actually receive some
response about the fact that this clock does not support setting its
rate.
However, I agree with you that this solution may lead to problems.
Maybe instead we should explicitly check in a command whether the given
clock has an appropriate hook set and output some message if this is not
the case. What do you think?

Regards,
Denis



More information about the barebox mailing list