clk: qcom: clk-rcg2: add rcg2 mux ops
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 18 Aug 2022 22:06:20 +0000 (00:06 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 27 Sep 2022 02:40:10 +0000 (21:40 -0500)
commitc5d2c96b3a7bd8987fad9957510034130037fccf
tree731c3eb15412144a17c14f74bb8f88b0c296941a
parent18f6e9cd7fa3ef6a6dcb10d3fe357afaa52bd216
clk: qcom: clk-rcg2: add rcg2 mux ops

An RCG may act as a mux that switch between 2 parents.
This is the case on IPQ6018 and IPQ8074 where the APCS core clk that feeds
the CPU cluster clock just switches between XO and the PLL that feeds it.

Add the required ops to add support for this special configuration and use
the generic mux function to determine the rate.

This way we dont have to keep a essentially dummy frequency table to use
RCG2 as a mux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220818220628.339366-1-robimarko@gmail.com
drivers/clk/qcom/clk-rcg.h
drivers/clk/qcom/clk-rcg2.c