phy: cadence: Sierra: Use clk_parent_data to provide parent information
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 26 Mar 2023 01:14:16 +0000 (18:14 -0700)
committerVinod Koul <vkoul@kernel.org>
Fri, 31 Mar 2023 13:46:05 +0000 (19:16 +0530)
commita59f6006cc07a676aff7c0e2ae70a8094b670034
tree343fce5b9411e293554f8bd5c9d557673fcfd1b0
parent6ef7aa323bd8c1f02bbf83afd1987f5dd7eaaef4
phy: cadence: Sierra: Use clk_parent_data to provide parent information

Rather than requesting the parent reference clocks for the sierra PHY PLLs
and then assigning the parents as a struct clk. Use the clk_parent_data
feature for the clock framework and only specify the firmware names of the
parent clocks.

The clock framework internally will then translate this to the actual
clocks. This allows to remove a bit of boilerplate code.

It also allows to only specify a single reference clock for both PLLs,
which is a valid use case. The clock framework can handle the case where
not all inputs for a clock mux are connected, while the custom
implementation in the driver could not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230326011416.363318-2-lars@metafoo.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/cadence/phy-cadence-sierra.c