summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufshcd-pltfrm.c
diff options
context:
space:
mode:
authorRaviv Shvili <rshvili@codeaurora.org>2014-09-25 12:32:24 (GMT)
committerChristoph Hellwig <hch@lst.de>2014-10-01 11:11:20 (GMT)
commit6a771a656041f404fae143e5d753d37f5c0688e7 (patch)
tree13596a256da37823e27f83998c5698e0cbaf0c87 /drivers/scsi/ufs/ufshcd-pltfrm.c
parentc6e79dacd86fd7ddd452fa52b3f4ca996db31e49 (diff)
downloadlinux-6a771a656041f404fae143e5d753d37f5c0688e7.tar.xz
ufs: add voting support for host controller power
Add the support for voting of the regulator powering the host controller logic. Signed-off-by: Raviv Shvili <rshvili@codeaurora.org> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Dolev Raviv <draviv@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd-pltfrm.c')
-rw-r--r--drivers/scsi/ufs/ufshcd-pltfrm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 642d80f..dde4e6e 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -147,6 +147,11 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
vreg->name = kstrdup(name, GFP_KERNEL);
+ /* if fixed regulator no need further initialization */
+ snprintf(prop_name, MAX_PROP_SIZE, "%s-fixed-regulator", name);
+ if (of_property_read_bool(np, prop_name))
+ goto out;
+
snprintf(prop_name, MAX_PROP_SIZE, "%s-max-microamp", name);
ret = of_property_read_u32(np, prop_name, &vreg->max_uA);
if (ret) {
@@ -198,6 +203,10 @@ static int ufshcd_parse_regulator_info(struct ufs_hba *hba)
struct device *dev = hba->dev;
struct ufs_vreg_info *info = &hba->vreg_info;
+ err = ufshcd_populate_vreg(dev, "vdd-hba", &info->vdd_hba);
+ if (err)
+ goto out;
+
err = ufshcd_populate_vreg(dev, "vcc", &info->vcc);
if (err)
goto out;