clk: qcom: smd-rpm: Switch to parent_data
authorKonrad Dybcio <konrad.dybcio@somainline.org>
Mon, 24 May 2021 22:54:55 +0000 (00:54 +0200)
committerStephen Boyd <sboyd@kernel.org>
Wed, 2 Jun 2021 07:19:52 +0000 (00:19 -0700)
Switch to parent_data and with that fix the longstanding issue where
if there wasn't a clock precisely named "xo_board", rpmcc would not play
along well. This started to show lately when "xo_board" was being changed to
"xo-board" so as to align with DTS naming spec.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20210524225456.398817-1-konrad.dybcio@somainline.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/clk-smd-rpm.c

index 0e1dfa8..9204aae 100644 (file)
                .hw.init = &(struct clk_init_data){                           \
                        .ops = &clk_smd_rpm_ops,                              \
                        .name = #_name,                                       \
-                       .parent_names = (const char *[]){ "xo_board" },       \
+                       .parent_data =  &(const struct clk_parent_data){ \
+                                       .fw_name = "xo",                \
+                                       .name = "xo_board",             \
+                       },                                              \
                        .num_parents = 1,                                     \
                },                                                            \
        };                                                                    \
                .hw.init = &(struct clk_init_data){                           \
                        .ops = &clk_smd_rpm_ops,                              \
                        .name = #_active,                                     \
-                       .parent_names = (const char *[]){ "xo_board" },       \
+                       .parent_data =  &(const struct clk_parent_data){ \
+                                       .fw_name = "xo",                \
+                                       .name = "xo_board",             \
+                       },                                              \
                        .num_parents = 1,                                     \
                },                                                            \
        }
                .hw.init = &(struct clk_init_data){                           \
                        .ops = &clk_smd_rpm_branch_ops,                       \
                        .name = #_name,                                       \
-                       .parent_names = (const char *[]){ "xo_board" },       \
+                       .parent_data =  &(const struct clk_parent_data){ \
+                                       .fw_name = "xo",                \
+                                       .name = "xo_board",             \
+                       },                                              \
                        .num_parents = 1,                                     \
                },                                                            \
        };                                                                    \
                .hw.init = &(struct clk_init_data){                           \
                        .ops = &clk_smd_rpm_branch_ops,                       \
                        .name = #_active,                                     \
-                       .parent_names = (const char *[]){ "xo_board" },       \
+                       .parent_data =  &(const struct clk_parent_data){ \
+                                       .fw_name = "xo",                \
+                                       .name = "xo_board",             \
+                       },                                              \
                        .num_parents = 1,                                     \
                },                                                            \
        }