Commit fbefb7cc authored by Niklas Cassel's avatar Niklas Cassel Committed by Stephen Boyd
Browse files

clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent



Allow accessing the parent clock names required for the driver operation
by using the device tree 'clock-names' property, while falling back to
the previous method of using names in the global name space.

This permits extending the driver to other platforms without having to
modify its source code.

Co-developed-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Link: https://lkml.kernel.org/r/20200103111429.1347-1-nks@flawful.org


Tested-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent e7ce74bc
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@

static const u32 gpll0_a53cc_map[] = { 4, 5 };

static const char * const gpll0_a53cc[] = {
	"gpll0_vote",
	"a53pll",
static const struct clk_parent_data pdata[] = {
	{ .fw_name = "aux", .name = "gpll0_vote", },
	{ .fw_name = "pll", .name = "a53pll", },
};

/*
@@ -62,8 +62,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
		return -ENOMEM;

	init.name = "a53mux";
	init.parent_names = gpll0_a53cc;
	init.num_parents = ARRAY_SIZE(gpll0_a53cc);
	init.parent_data = pdata;
	init.num_parents = ARRAY_SIZE(pdata);
	init.ops = &clk_regmap_mux_div_ops;
	init.flags = CLK_SET_RATE_PARENT;