linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Darren.Ye" <darren.ye@mediatek.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 05/14] ASoC: mediatek: mt8196: support audio clock control
Date: Fri, 7 Mar 2025 16:32:02 +0100	[thread overview]
Message-ID: <13f286c5-fce6-44d9-8965-c6422cd43b30@kernel.org> (raw)
In-Reply-To: <20250307124841.23777-6-darren.ye@mediatek.com>

On 07/03/2025 13:47, Darren.Ye wrote:
> +
> +int mt8196_init_clock(struct mtk_base_afe *afe)
> +{
> +	struct mt8196_afe_private *afe_priv = afe->platform_priv;
> +	int i = 0;
> +
> +	afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk),
> +				     GFP_KERNEL);
> +	if (!afe_priv->clk)
> +		return -ENOMEM;
> +
> +	for (i = 0; i < CLK_NUM; i++) {
> +		if (!aud_clks[i]) {
> +			dev_err(afe->dev, "%s(), clk id %d not define!!!\n",
> +				__func__, i);
> +		}
> +
> +		afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]);
> +		if (IS_ERR(afe_priv->clk[i])) {
> +			dev_err(afe->dev, "%s devm_clk_get %s fail, ret %ld\n",
> +				__func__,

dev_err_probe() and drop __func__ and ret.


> +				aud_clks[i], PTR_ERR(afe_priv->clk[i]));
> +			afe_priv->clk[i] = NULL;
> +		}
> +	}
> +
> +	afe_priv->vlp_ck = syscon_regmap_lookup_by_phandle(afe->dev->of_node,
> +							   "vlpcksys");
> +	if (IS_ERR(afe_priv->vlp_ck)) {
> +		dev_err(afe->dev, "%s() Cannot find vlpcksys: %ld\n",
> +			__func__, PTR_ERR(afe_priv->vlp_ck));
> +		afe_priv->vlp_ck = NULL;
> +	}
> +
> +	afe_priv->cksys_ck = syscon_regmap_lookup_by_phandle(afe->dev->of_node,
> +							     "cksys");
> +	if (IS_ERR(afe_priv->cksys_ck)) {
> +		dev_err(afe->dev, "%s() Cannot find cksys controller: %ld\n",
> +			__func__, PTR_ERR(afe_priv->cksys_ck));
Eeach of my comments apply to entier code to all patches. You keep
repeating same patterns from downstream. You should rather take upstream
drivers as your base.

Best regards,
Krzysztof

  reply	other threads:[~2025-03-07 15:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 12:47 [PATCH 00/14] ASoC: mediatek: Add support for MT8196 SoC Darren.Ye
2025-03-07 12:47 ` [PATCH 01/14] ASoC: mediatek: common: modify mtk afe common driver for mt8196 Darren.Ye
2025-03-07 15:20   ` Krzysztof Kozlowski
2025-03-10 15:23   ` AngeloGioacchino Del Regno
2025-03-07 12:47 ` [PATCH 02/14] ASoC: mediatek: common: modify mtk afe platform " Darren.Ye
2025-03-07 15:21   ` Krzysztof Kozlowski
2025-03-07 12:47 ` [PATCH 03/14] ASoC: mediatek: mt8196: add common header Darren.Ye
2025-03-07 12:47 ` [PATCH 04/14] ASoC: mediatek: mt8196: add common interface for mt8196 DAI driver Darren.Ye
2025-03-07 15:22   ` Krzysztof Kozlowski
2025-03-10 15:23   ` AngeloGioacchino Del Regno
2025-03-07 12:47 ` [PATCH 05/14] ASoC: mediatek: mt8196: support audio clock control Darren.Ye
2025-03-07 15:32   ` Krzysztof Kozlowski [this message]
2025-03-10 15:23   ` AngeloGioacchino Del Regno
2025-03-07 12:47 ` [PATCH 06/14] ASoC: mediatek: mt8196: support audio GPIO control Darren.Ye
2025-03-14 10:21   ` Linus Walleij
2025-03-07 12:47 ` [PATCH 07/14] ASoC: mediatek: mt8196: support ADDA in platform driver Darren.Ye
2025-03-07 12:47 ` [PATCH 08/14] ASoC: mediatek: mt8196: support I2S " Darren.Ye
2025-03-07 15:24   ` Krzysztof Kozlowski
2025-03-07 12:47 ` [PATCH 09/14] ASoC: mediatek: mt8196: support TDM " Darren.Ye
2025-03-07 12:47 ` [PATCH 10/14] ASoC: mediatek: mt8196: support CM " Darren.Ye
2025-03-07 15:33   ` Krzysztof Kozlowski
2025-03-07 12:47 ` [PATCH 11/14] ASoC: mediatek: mt8196: add " Darren.Ye
2025-03-07 15:32   ` Krzysztof Kozlowski
2025-03-07 12:47 ` [PATCH 12/14] dt-bindings: mediatek: mt8196: add audio AFE document Darren.Ye
2025-03-07 14:35   ` Rob Herring (Arm)
2025-03-07 15:15   ` Krzysztof Kozlowski
2025-03-07 12:47 ` [PATCH 13/14] ASoC: mediatek: mt8196: add machine driver with mt6681 Darren.Ye
2025-03-07 12:47 ` [PATCH 14/14] dt-bindings: mediatek: mt8196: add mt8196-mt6681 document Darren.Ye
2025-03-07 14:35   ` Rob Herring (Arm)
2025-03-07 15:19   ` Krzysztof Kozlowski

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=13f286c5-fce6-44d9-8965-c6422cd43b30@kernel.org \
    --to=krzk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=darren.ye@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.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).