clk: vc5: Use `clamp()` to restrict PLL range
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 14 Jan 2023 23:34:58 +0000 (15:34 -0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 18 Jan 2023 18:49:48 +0000 (10:49 -0800)
commit3ed741db04f58e8df0d46cec7ecfc4bfd075f047
treecc92f69c1ae777f1da674720c36462a5dbe1bfe9
parent1b929c02afd37871d5afb9d498426f83432e71c2
clk: vc5: Use `clamp()` to restrict PLL range

The VCO frequency needs to be within a certain range and the driver
enforces this.

Make use of the clamp macro to implement this instead of open-coding it.
This makes the code a bit shorter and also semanticly stronger.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230114233500.3294789-1-lars@metafoo.de
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-versaclock5.c