From: Federico Amedeo Izzo <federico@izzo.pro>
To: Neha Malcom Francis <n-francis@ti.com>
Cc: Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io, u-boot@lists.denx.de,
Neil Armstrong <neil.armstrong@linaro.org>,
Bhupesh Sharma <bhupesh.linux@gmail.com>,
Casey Connolly <casey.connolly@linaro.org>,
Tom Rini <trini@konsulko.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Julien Stephan <jstephan@baylibre.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Peng Fan <peng.fan@nxp.com>,
Luca Weiss <luca.weiss@fairphone.com>,
Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Subject: Re: [PATCH v4 2/2] ufs: qcom: add ufs host regulator support
Date: Mon, 25 May 2026 21:41:00 +0200 [thread overview]
Message-ID: <4864d2a49cdabe9b52e297cff11d7f4f@izzo.pro> (raw)
In-Reply-To: <177971117506.986002.14811075924990554544.b4-review@b4>
Il 2026-05-25 14:12 Neha Malcom Francis ha scritto:
> On Sat, 23 May 2026 15:04:25 +0200, Federico Amedeo Izzo
> <federico@izzo.pro> wrote:
>
>> diff --git a/drivers/ufs/ufs-qcom.c b/drivers/ufs/ufs-qcom.c
>> index dc40ee62daf..0e2e45f1075 100644
>> --- a/drivers/ufs/ufs-qcom.c
>> +++ b/drivers/ufs/ufs-qcom.c
>> @@ -561,6 +562,19 @@ static int ufs_qcom_init(struct ufs_hba *hba)
>>
>> priv->hba = hba;
>>
>> + /* enable regulators */
>> + err = regulator_set_enable(priv->vcc, true);
>> + if (err && err != -ENOSYS)
>> + dev_warn(hba->dev, "failed to enable regulator
>> vcc-supply:%d\n", err);
>> +
>> + err = regulator_set_enable(priv->vccq, true);
>> + if (err && err != -ENOSYS)
>> + dev_warn(hba->dev, "failed to enable regulator
>> vccq-supply:%d\n", err);
>> +
>> + err = regulator_set_enable(priv->vccq2, true);
>> + if (err && err != -ENOSYS)
>> + dev_warn(hba->dev, "failed to enable regulator
>> vccq2-supply:%d\n", err);
>
> vccq2 is optional right? Is it verified that the optional code route
> will never
> return ENOSYS and there is handling in regulator_set_enable for NULL
> regulators?
Hi,
vccq2 is indeed optional, if it's not present, regulator_set_enable()
will handle the NULL regulator and return -ENOSYS.
The warning is skipped for -ENOSYS as we don't want to print warnings
for non existing regulators,
Below is a section of regulator_set_enable() from regulator_uclass.c
int regulator_set_enable(struct udevice *dev, bool enable)
{
const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
struct dm_regulator_uclass_plat *uc_pdata;
int ret, old_enable = 0;
if (!ops || !ops->set_enable)
return -ENOSYS;
[...]
Greetings,
Federico Amedeo Izzo
next prev parent reply other threads:[~2026-05-25 20:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 13:04 [PATCH v4 0/2] Add regulator support to qcom-ufs driver Federico Amedeo Izzo via B4 Relay
2026-05-23 13:04 ` [PATCH v4 1/2] regulator: qcom-rpmh-regulator: fix regulator mode mismatch Federico Amedeo Izzo via B4 Relay
2026-05-23 13:04 ` [PATCH v4 2/2] ufs: qcom: add ufs host regulator support Federico Amedeo Izzo via B4 Relay
2026-05-25 12:12 ` Neha Malcom Francis
2026-05-25 19:41 ` Federico Amedeo Izzo [this message]
2026-05-26 6:56 ` Neha Malcom Francis
2026-05-26 6:59 ` Neha Malcom Francis
2026-05-26 14:01 ` [PATCH v4 0/2] Add regulator support to qcom-ufs driver Casey Connolly
2026-06-09 12:49 ` (subset) " Casey Connolly
2026-06-09 12:52 ` Neil Armstrong
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=4864d2a49cdabe9b52e297cff11d7f4f@izzo.pro \
--to=federico@izzo.pro \
--cc=aswin.murugan@oss.qualcomm.com \
--cc=bhupesh.linux@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=jstephan@baylibre.com \
--cc=luca.weiss@fairphone.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=n-francis@ti.com \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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