Re: [PATCH v3 5/6] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq

From: Stephen Boyd
Date: Wed Mar 29 2023 - 15:59:28 EST


Quoting Christian Marangi (2023-01-17 05:54:58)
> diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h
> index 01581f4d2c39..18f4f7b59f36 100644
> --- a/drivers/clk/qcom/clk-rcg.h
> +++ b/drivers/clk/qcom/clk-rcg.h
> @@ -15,6 +25,8 @@ struct freq_tbl {
> u8 pre_div;
> u16 m;
> u16 n;
> + int confs_num;
> + const struct freq_conf *confs;

This design is uncommon. I suggest you have a different clk_ops
structure and/or entire clk_rcg (clk_rcg_fm?) that does things
differently. Then we don't have to worry that all the other rcg2 clks
(of which there are many) could be broken by this patch.