mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "scsi: ufs: Read device tree to find UFS's Vccq2 voltage level"
This commit is contained in:
commit
0a652bb3d2
1 changed files with 13 additions and 0 deletions
|
|
@ -178,8 +178,21 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
|
|||
vreg->min_uV = UFS_VREG_VCCQ_MIN_UV;
|
||||
vreg->max_uV = UFS_VREG_VCCQ_MAX_UV;
|
||||
} else if (!strcmp(name, "vccq2")) {
|
||||
#if defined(CONFIG_SCSI_UFSHCD_QTI)
|
||||
prop = of_get_property(np, "vccq2-voltage-level", &len);
|
||||
if (!prop || (len != (2 * sizeof(__be32)))) {
|
||||
dev_warn(dev, "%s vccq2-voltage-level property.\n",
|
||||
prop ? "invalid format" : "no");
|
||||
vreg->min_uV = UFS_VREG_VCCQ2_MIN_UV;
|
||||
vreg->max_uV = UFS_VREG_VCCQ2_MAX_UV;
|
||||
} else {
|
||||
vreg->min_uV = be32_to_cpup(&prop[0]);
|
||||
vreg->max_uV = be32_to_cpup(&prop[1]);
|
||||
}
|
||||
#else
|
||||
vreg->min_uV = UFS_VREG_VCCQ2_MIN_UV;
|
||||
vreg->max_uV = UFS_VREG_VCCQ2_MAX_UV;
|
||||
#endif
|
||||
}
|
||||
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue