mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: "nguyenb@codeaurora.org" <nguyenb@codeaurora.org>
Cc: "cang@codeaurora.org" <cang@codeaurora.org>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	YueHaibing <yuehaibing@huawei.com>, Bean Huo <beanhuo@micron.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v1 2/2] scsi: ufs: Support reading UFS's Vcc voltage from device tree
Date: Tue, 15 Sep 2020 06:51:35 +0000	[thread overview]
Message-ID: <BY5PR04MB6705F57DAF788FAFDF71FFC4FC200@BY5PR04MB6705.namprd04.prod.outlook.com> (raw)
In-Reply-To: <170592eceb26da041f276cf4ca33aaf2@codeaurora.org>

> > Maybe instead call ufshcd_populate_vreg with the new name,
> > To not break the function flow, and just add another else if ?
> Could you please clarify your comments? Are you suggesting to create a
> new function?
> Thank you.
No, just call ufshcd_populate_vreg with the new name, e.g. something like:

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 3db0af6..9798d4c 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -141,6 +141,8 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
                        vreg->min_uV = UFS_VREG_VCC_MIN_UV;
                        vreg->max_uV = UFS_VREG_VCC_MAX_UV;
                }
+       } else if (!strcmp(name, "vcc-voltage-level")) {
+               /* add your changes here */
        } else if (!strcmp(name, "vccq")) {
                vreg->min_uV = UFS_VREG_VCCQ_MIN_UV;
                vreg->max_uV = UFS_VREG_VCCQ_MAX_UV;
@@ -177,8 +179,12 @@ static int ufshcd_parse_regulator_info(struct ufs_hba *hba)
                goto out;
 
        err = ufshcd_populate_vreg(dev, "vcc", &info->vcc);
-       if (err)
-               goto out;
+       if (err) {
+               err = ufshcd_populate_vreg(dev, "vcc-voltage-level",
+                                          &info->vcc);
+               if (err)
+                       goto out;
+       }
 
        err = ufshcd_populate_vreg(dev, "vccq", &info->vccq);
        if (err)

  reply	other threads:[~2020-09-15  6:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1598939393.git.nguyenb@codeaurora.org>
2020-09-01  6:00 ` [PATCH v1 1/2] scsi: dt-bindings: ufs: Add vcc-voltage-level for UFS Bao D. Nguyen
2020-09-13  9:35   ` Avri Altman
2020-09-14 16:19     ` nguyenb
2020-09-14 18:35   ` Rob Herring
2020-09-15  8:10     ` nguyenb
2020-09-18 19:01       ` Rob Herring
2020-09-22  0:22         ` nguyenb
2020-09-22  0:36           ` Bjorn Andersson
2020-09-23 17:32             ` nguyenb
2020-09-15  4:41   ` Bjorn Andersson
2020-09-15  8:14     ` nguyenb
2020-09-15 13:43       ` Bjorn Andersson
2020-09-15 16:47         ` nguyenb
2020-09-15 18:36           ` Bjorn Andersson
2020-09-01  6:00 ` [PATCH v1 2/2] scsi: ufs: Support reading UFS's Vcc voltage from device tree Bao D. Nguyen
2020-09-13  9:37   ` Avri Altman
2020-09-14 18:43     ` nguyenb
2020-09-15  6:51       ` Avri Altman [this message]
2020-09-15 13:46   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR04MB6705F57DAF788FAFDF71FFC4FC200@BY5PR04MB6705.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nguyenb@codeaurora.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®