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: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
parent
c1c02eecad
commit
fd9bba4caa
1 changed files with 8 additions and 0 deletions
|
@ -267,6 +267,14 @@ static int __ufs_qcom_phy_init_vreg(struct phy *phy,
|
||||||
|
|
||||||
char prop_name[MAX_PROP_NAME];
|
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 optional ? err : -ENODATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vreg->name = kstrdup(name, GFP_KERNEL);
|
vreg->name = kstrdup(name, GFP_KERNEL);
|
||||||
if (!vreg->name) {
|
if (!vreg->name) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|
Loading…
Add table
Reference in a new issue