From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
avri.altman-Sjgp3cTcYWE@public.gmane.org,
alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org
Cc: marc.w.gonzalez-GANU6spQydw@public.gmane.org,
chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Subject: [PATCH v2 3/4] scsi: ufs: change "<name>-max-microamp" to non-mandatory property
Date: Fri, 15 Mar 2019 17:26:13 +0800 [thread overview]
Message-ID: <1552641974-30672-5-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1552641974-30672-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
In some platforms, vcc, vccq and vccq2 regulators may not need
to define their current limit but need to define their voltage
range for correct regulator_set_voltage behaviors.
However, missing "<name>-max-microamp" property in device tree
will lead to initialization fail. This limitation shall be
resolved to tolerate such kind of regulators.
Because we do bypass regulator_set_load operations in case
current limit is undefined, so this change shall be safe.
Signed-off-by: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 588079286e8a..2f244d388ca8 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -157,11 +157,9 @@ static int ufshcd_populate_vreg(struct device *dev, const char *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) {
- dev_err(dev, "%s: unable to find %s err %d\n",
- __func__, prop_name, ret);
- goto out;
+ if (of_property_read_u32(np, prop_name, &vreg->max_uA)) {
+ dev_info(dev, "%s: unable to find %s\n", __func__, prop_name);
+ vreg->max_uA = 0;
}
if (!strcmp(name, "vcc")) {
--
2.18.0
next prev parent reply other threads:[~2019-03-15 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 9:26 scsi: ufs: fix regulator operations and remove "<name>-fixed-regulator" device tree property Stanley Chu
[not found] ` <1552641974-30672-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-03-15 9:26 ` [PATCH v2 0/4] " Stanley Chu
2019-03-15 9:26 ` [PATCH v2 1/4] scsi: ufs: remove unused min_uA field in struct ufs_vreg Stanley Chu
2019-03-15 9:26 ` [PATCH v2 2/4] scsi: ufs: fix regulator set load and icc-level configuration Stanley Chu
2019-03-15 9:26 ` Stanley Chu [this message]
2019-03-15 9:26 ` [PATCH v2 4/4] scsi: ufs: remove "<name>-fixed-regulator" device tree property Stanley Chu
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=1552641974-30672-5-git-send-email-stanley.chu@mediatek.com \
--to=stanley.chu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
--cc=alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=avri.altman-Sjgp3cTcYWE@public.gmane.org \
--cc=chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marc.w.gonzalez-GANU6spQydw@public.gmane.org \
--cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
/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