From: Marek Vasut <marex@denx.de>
To: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: Alice Guo <alice.guo@nxp.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: 回复: [EXT] [PATCH] power: regulator: scmi: Move regulator subnode hack to scmi_regulator
Date: Tue, 8 Apr 2025 20:30:38 +0200 [thread overview]
Message-ID: <4db49cb4-bb80-4aa8-958b-a5b14f0d22d4@denx.de> (raw)
In-Reply-To: <PAXPR04MB96441F643A1FCC464C25CDA2E2AE2@PAXPR04MB9644.eurprd04.prod.outlook.com>
On 4/3/25 12:56 PM, Alice Guo (OSS) wrote:
>> -----邮件原件-----
>> 发件人: Marek Vasut <marex@denx.de>
>> 发送时间: 2025年3月22日 9:45
>> 收件人: u-boot@lists.denx.de
>> 抄送: Marek Vasut <marex@denx.de>; Alice Guo <alice.guo@nxp.com>; Ilias
>> Apalodimas <ilias.apalodimas@linaro.org>; Jaehoon Chung
>> <jh80.chung@samsung.com>; Tom Rini <trini@konsulko.com>
>> 主题: [EXT] [PATCH] power: regulator: scmi: Move regulator subnode hack to
>> scmi_regulator
>>
>> Caution: This is an external email. Please take care when clicking links or
>> opening attachments. When in doubt, report the message using the 'Report this
>> email' button
>>
>>
>> The current code attempts to bind scmi_voltage_domain to regulator subnode
>> of the SCMI protocol node, so scmi_voltage_domain can then bind regulators
>> directly to subnodes of its node. This kind of behavior should not be in core code,
>> move it into scmi_voltage_domain driver code. Let the driver descend into
>> regulator node and bind regulators to its subnodes.
>>
>> Fixes: 1f213ee4dbf2 ("firmware: scmi: voltage regulator")
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: Alice Guo <alice.guo@nxp.com>
>> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: u-boot@lists.denx.de
>> ---
>> drivers/firmware/scmi/scmi_agent-uclass.c | 8 +-------
>> drivers/power/regulator/scmi_regulator.c | 6 ++++++
>> 2 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c
>> b/drivers/firmware/scmi/scmi_agent-uclass.c
>> index 8c907c3b032..e6e43ae936a 100644
>> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
>> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
>> @@ -427,14 +427,8 @@ static int scmi_bind_protocols(struct udevice *dev)
>> break;
>> case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
>> if (IS_ENABLED(CONFIG_DM_REGULATOR_SCMI)
>> &&
>> - scmi_protocol_is_supported(dev, protocol_id))
>> {
>> - node = ofnode_find_subnode(node,
>> "regulators");
>> - if (!ofnode_valid(node)) {
>> - dev_err(dev, "no regulators
>> node\n");
>> - return -ENXIO;
>> - }
>> + scmi_protocol_is_supported(dev,
>> + protocol_id))
>> drv =
>> DM_DRIVER_GET(scmi_voltage_domain);
>> - }
>> break;
>> default:
>> break;
>> diff --git a/drivers/power/regulator/scmi_regulator.c
>> b/drivers/power/regulator/scmi_regulator.c
>> index 99f6506f162..2550b27246f 100644
>> --- a/drivers/power/regulator/scmi_regulator.c
>> +++ b/drivers/power/regulator/scmi_regulator.c
>> @@ -178,6 +178,12 @@ static int scmi_regulator_bind(struct udevice *dev)
>> ofnode node;
>> int ret;
>>
>> + node = ofnode_find_subnode(node, "regulators");
>> + if (!ofnode_valid(node)) {
>> + dev_err(dev, "no regulators node\n");
>> + return -ENXIO;
>> + }
>> +
>> drv = DM_DRIVER_GET(scmi_regulator);
>>
>> ofnode_for_each_subnode(node, dev_ofnode(dev)) {
>> --
>> 2.47.2
>
> Hi Marek,
>
> Is there a problem in your patch? Should it be changed like this:
What kind of problem ? Can you please elaborate ?
next prev parent reply other threads:[~2025-04-08 18:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-22 1:44 [PATCH] power: regulator: scmi: Move regulator subnode hack to scmi_regulator Marek Vasut
2025-04-03 10:56 ` 回复: [EXT] " Alice Guo (OSS)
2025-04-08 18:30 ` Marek Vasut [this message]
2025-04-09 6:42 ` 回复: " Alice Guo (OSS)
2025-04-18 2:52 ` Peng Fan
2025-04-23 3:18 ` Peng Fan
2025-04-23 16:05 ` Peng Fan (OSS)
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=4db49cb4-bb80-4aa8-958b-a5b14f0d22d4@denx.de \
--to=marex@denx.de \
--cc=alice.guo@nxp.com \
--cc=alice.guo@oss.nxp.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=trini@konsulko.com \
--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