All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: mediatek: mt2701: Use devm_clk_get_optional() for audio_mrgif_pd
@ 2026-08-17 10:49 phucduc.bui
  2026-08-17 10:49 ` [PATCH 2/3] ASoC: mediatek: mt2701: Use dev_err_probe() for error handling phucduc.bui
  2026-08-17 10:49 ` [PATCH 3/3] ASoC: mediatek: mt2701: Drop redundant probe error messages phucduc.bui
  0 siblings, 2 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-17 10:49 UTC (permalink / raw)
  To: Mark Brown, Matthias Brugger
  Cc: Liam Girdwood, AngeloGioacchino Del Regno, Jaroslav Kysela,
	Takashi Iwai, Rosen Penev, Daniel Golle, linux-sound,
	linux-arm-kernel, linux-mediatek, linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

The audio_mrgif_pd clock is optional as some platforms may support the
BT path while others do not. Use devm_clk_get_optional() to reflect
this.

Propagate other errors to the caller.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
index d217f9320ad2..18f0f27bd8c0 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -89,13 +89,9 @@ int mt2701_init_clock(struct mtk_base_afe *afe)
 	}
 
 	/* Some platforms may support BT path */
-	afe_priv->mrgif_ck = devm_clk_get(afe->dev, "audio_mrgif_pd");
-	if (IS_ERR(afe_priv->mrgif_ck)) {
-		if (PTR_ERR(afe_priv->mrgif_ck) == -EPROBE_DEFER)
-			return -EPROBE_DEFER;
-
-		afe_priv->mrgif_ck = NULL;
-	}
+	afe_priv->mrgif_ck = devm_clk_get_optional(afe->dev, "audio_mrgif_pd");
+	if (IS_ERR(afe_priv->mrgif_ck))
+		return PTR_ERR(afe_priv->mrgif_ck);
 
 	/*
 	 * Optional HDMI audio clocks. Platforms that do not wire up the
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-17 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 10:49 [PATCH 1/3] ASoC: mediatek: mt2701: Use devm_clk_get_optional() for audio_mrgif_pd phucduc.bui
2026-08-17 10:49 ` [PATCH 2/3] ASoC: mediatek: mt2701: Use dev_err_probe() for error handling phucduc.bui
2026-08-17 10:49 ` [PATCH 3/3] ASoC: mediatek: mt2701: Drop redundant probe error messages phucduc.bui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.