Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01044abd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcom: mpm-of: read clock name from dts file"

parents 4d7d16dd e837636c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ The required nodes for the MPM driver are:
	to the register that triggers a interrupt to the RPM.
- reg-names: "vmpm" - string to identify the shared memory space region
	     "ipc" - string to identify the register that triggers a interrupt
- clocks: clock identifers used by clock driver while looking up mpm clocks.
- clock-names: name of the clock used by mpm driver.
- qcom,ipc-bit-offset: The bit to set in the ipc register that triggers a interrupt
	to the RPM
- qcom,gic-parent: phandle to the gic interrupt controller
@@ -40,6 +42,8 @@ Example:
		    <0xfa006000 0x1000>;   /* MSM_APCS_GCC_BASE 4K*/
		reg-names = "vmpm", "ipc"
			interrupts = <0 171 1>;
		clocks = <&clock_rpm clk_xo_lpm_clk>;
		clock-names = "xo";

		qcom,ipc-bit-offset = <0>;

+10 −1
Original line number Diff line number Diff line
@@ -664,13 +664,22 @@ static int msm_mpm_dev_probe(struct platform_device *pdev)
	struct resource *res = NULL;
	int offset, ret;
	struct msm_mpm_device_data *dev = &msm_mpm_dev_data;
	const char *clk_name;
	char *key;

	if (msm_mpm_initialized & MSM_MPM_DEVICE_PROBED) {
		pr_warn("MPM device probed multiple times\n");
		return 0;
	}

	xo_clk = devm_clk_get(&pdev->dev, "xo");
	key = "clock-names";
	ret = of_property_read_string(pdev->dev.of_node, key, &clk_name);
	if (ret) {
		pr_err("%s(): Cannot read clock name%s\n", __func__, key);
		return -EINVAL;
	}

	xo_clk = devm_clk_get(&pdev->dev, clk_name);

	if (IS_ERR(xo_clk)) {
		pr_err("%s(): Cannot get clk resource for XO\n", __func__);