devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Friday Yang <friday.yang@mediatek.com>,
	Yong Wu <yong.wu@mediatek.com>, Rob Herring <robh@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v11 2/2] memory: mtk-smi: mt8188: Add SMI reset and clamp
Date: Sat, 18 Oct 2025 18:41:48 +0200	[thread overview]
Message-ID: <3ecf0545-513f-4a84-9772-f6cecc50f48b@kernel.org> (raw)
In-Reply-To: <20250917120724.8650-3-friday.yang@mediatek.com>

On 17/09/2025 14:07, Friday Yang wrote:
>  static int mtk_smi_device_link_common(struct device *dev, struct device **com_dev)
>  {
>  	struct platform_device *smi_com_pdev;
> @@ -638,6 +711,46 @@ static int mtk_smi_dts_clk_init(struct device *dev, struct mtk_smi *smi,
>  	return ret;
>  }
> 
> +static int mtk_smi_larb_parse_syscon(struct mtk_smi_larb *larb, int larbid)
> +{
> +	struct device *dev = larb->dev;
> +	const struct mtk_smi_larb_gen *larb_gen = larb->larb_gen;
> +	int ret;
> +
> +	larb->smi_comm_in_port_id = larb_gen->clamp_port[larbid];
> +	larb->smi_comm_syscon = syscon_regmap_lookup_by_phandle(dev->of_node,
> +								"mediatek,smi");

The code already parses this phandle (in other place). Why do you need
second time?

> +	if (IS_ERR(larb->smi_comm_syscon)) {
> +		ret = PTR_ERR(larb->smi_comm_syscon);
> +		larb->smi_comm_syscon = NULL;
> +		return dev_err_probe(dev, ret,
> +				     "Failed to get smi syscon for larb %d\n", larbid);
> +	}
> +
> +	return 0;
> +}
> +
> +static int mtk_smi_larb_parse_reset(struct mtk_smi_larb *larb)
> +{
> +	struct device *dev = larb->dev;
> +	int ret;
> +
> +	larb->rst_con = devm_reset_control_get_exclusive(dev, "larb");
> +	if (IS_ERR(larb->rst_con))
> +		return dev_err_probe(dev, PTR_ERR(larb->rst_con),
> +				     "Failed to get reset controller\n");


This looks like ABI break. Aren't all devices affected?

> +
> +	larb->nb.notifier_call = mtk_smi_genpd_callback;
> +	ret = dev_pm_genpd_add_notifier(dev, &larb->nb);
> +	if (ret) {
> +		larb->nb.notifier_call = NULL;
> +		return dev_err_probe(dev, ret,
> +				     "Failed to add genpd callback\n");
> +	}
> +
> +	return 0;
> +}
> +
Best regards,
Krzysztof

  parent reply	other threads:[~2025-10-18 16:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 12:07 [PATCH v11 0/2] Add SMI reset and clamp for MediaTek MT8188 SoC Friday Yang
2025-09-17 12:07 ` [PATCH v11 1/2] dt-bindings: memory: mediatek: Add SMI reset and clamp for MT8188 Friday Yang
2025-10-18 16:42   ` Krzysztof Kozlowski
2025-10-31  6:10     ` Friday Yang (杨阳)
2025-10-31 12:07       ` Krzysztof Kozlowski
2025-09-17 12:07 ` [PATCH v11 2/2] memory: mtk-smi: mt8188: Add SMI reset and clamp Friday Yang
2025-09-17 12:55   ` AngeloGioacchino Del Regno
2025-09-20  2:11   ` Yong Wu (吴勇)
2025-10-18 16:41   ` Krzysztof Kozlowski [this message]
2025-10-31  6:10     ` Friday Yang (杨阳)

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=3ecf0545-513f-4a84-9772-f6cecc50f48b@kernel.org \
    --to=krzk@kernel.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=friday.yang@mediatek.com \
    --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 \
    --cc=yong.wu@mediatek.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;
as well as URLs for NNTP newsgroup(s).