From: "Yong Wu (吴勇)" <Yong.Wu@mediatek.com>
To: "robh@kernel.org" <robh@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"krzk@kernel.org" <krzk@kernel.org>,
"Friday Yang (杨阳)" <Friday.Yang@mediatek.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH v12 2/2] memory: mtk-smi: mt8188: Add SMI reset and clamp
Date: Fri, 13 Feb 2026 07:37:57 +0000 [thread overview]
Message-ID: <a22f53aa6f31ca840a59a125483cede48072c5c7.camel@mediatek.com> (raw)
In-Reply-To: <20260119120552.9325-3-friday.yang@mediatek.com>
On Mon, 2026-01-19 at 20:05 +0800, Friday Yang wrote:
> To prevent handling glitch signals during MTCMOS on/off transitions,
> SMI requires clamp and reset operations. Parse the reset settings for
> SMI LARBs and the clamp settings for the SMI Sub-Common. Register
> genpd callback for the SMI LARBs located in image, camera and IPE
> subsystems, and apply reset and clamp operations within the callback.
> The 'mtk_smi_device_link_common' already parses the 'mediatek,smi'
> property. A similar step is required to obtain the SMI Common regmap
> from the 'mediatek,smi' property for the clamp function. To
> centralize
> this process and avoid redundant parsing, we achieve it together.
>
> Signed-off-by: Friday Yang <friday.yang@mediatek.com>
> ---
> drivers/memory/mtk-smi.c | 177 ++++++++++++++++++++++++++++++++++++-
> --
> 1 file changed, 167 insertions(+), 10 deletions(-)
[snip]
> smi_com_dev = &smi_com_pdev->dev;
> @@ -611,13 +688,36 @@ static int mtk_smi_device_link_common(struct
> device *dev, struct device **com_de
> DL_FLAG_PM_RUNTIME | DL_FLAG_STATELESS);
> if (!link) {
> dev_err(dev, "Unable to link smi-common dev\n");
> - put_device(&smi_com_pdev->dev);
> - return -ENODEV;
> + ret = -ENODEV;
> + goto err_put_device;
> }
>
> *com_dev = smi_com_dev;
>
> + if (require_clamp) {
> + larb = dev_get_drvdata(dev);
> + larb_gen = larb->larb_gen;
> + larbid = larb->larbid;
> + larb->smi_comm_in_port_id = larb_gen-
> >clamp_port[larbid];
> + larb->smi_comm_syscon =
> syscon_node_to_regmap(smi_com_node);
> + if (IS_ERR(larb->smi_comm_syscon)) {
> + dev_err(dev, "Failed to get smi syscon for larb
> %d\n", larbid);
> + ret = PTR_ERR(larb->smi_comm_syscon);
> + larb->smi_comm_syscon = NULL;
> + goto err_remove_link;
> + }
> + }
sorry for the late reply.
It looks strange to put this part in this device_link function. If we
want to avoid re-parse the "mediatek,smi" phandle, save the
"smi_com_node" to a variable, then move this part into the below
mtk_smi_larb_parse_reset.
Thanks.
prev parent reply other threads:[~2026-02-13 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 12:05 [PATCH v12 0/2] Add SMI reset and clamp for MediaTek MT8188 SoC Friday Yang
2026-01-19 12:05 ` [PATCH v12 1/2] dt-bindings: memory: mediatek: Add SMI reset and clamp for MT8188 Friday Yang
2026-01-19 12:05 ` [PATCH v12 2/2] memory: mtk-smi: mt8188: Add SMI reset and clamp Friday Yang
2026-02-13 7:37 ` Yong Wu (吴勇) [this message]
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=a22f53aa6f31ca840a59a125483cede48072c5c7.camel@mediatek.com \
--to=yong.wu@mediatek.com \
--cc=Friday.Yang@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.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
all inboxes | Powered by JetHome®