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

Commit d44fa178 authored by Can Guo's avatar Can Guo
Browse files

phy: qcom-ufs: parse ref-clk details prior to resource request



Do not request a resource if the ref clk regulator details are
not defined in ufs phy node.

Change-Id: I10eb426d4407388681340cb71fe9e761794dc298
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 9542a206
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -228,6 +228,14 @@ static int ufs_qcom_phy_init_vreg(struct device *dev,

	char prop_name[MAX_PROP_NAME];

	if (dev->of_node) {
		snprintf(prop_name, MAX_PROP_NAME, "%s-supply", name);
		if (!of_parse_phandle(dev->of_node, prop_name, 0)) {
			dev_dbg(dev, "No vreg data found for %s\n", prop_name);
			return -ENODATA;
		}
	}

	vreg->name = name;
	vreg->reg = devm_regulator_get(dev, name);
	if (IS_ERR(vreg->reg)) {