* [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups
@ 2024-01-11 10:52 AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
` (8 more replies)
0 siblings, 9 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
This series converts MediaTek AFE drivers' probe functions to use
dev_err_probe() and devm functions where possible and, in some
cases, dropping the .remove_new() callback, reducing the size.
Cheers!
AngeloGioacchino Del Regno (7):
ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable()
ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable()
ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe()
ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 78 +++------------
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 108 +++++++--------------
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 95 ++++++------------
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 12 +--
4 files changed, 81 insertions(+), 212 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component() AngeloGioacchino Del Regno
` (7 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Switch from pm_runtime_enable() to devm_pm_runtime_enable() to simplify
the probe function.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 24 ++++++++--------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
index b6291b7c811e..ea611730de9c 100644
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
@@ -1117,11 +1117,11 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, afe);
- pm_runtime_enable(&pdev->dev);
- if (!pm_runtime_enabled(&pdev->dev)) {
+ ret = devm_pm_runtime_enable(&pdev->dev);
+ if (ret) {
ret = mt8173_afe_runtime_resume(&pdev->dev);
if (ret)
- goto err_pm_disable;
+ return ret;
}
afe->reg_back_up_list = mt8173_afe_backup_list;
@@ -1133,19 +1133,17 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
&mtk_afe_pcm_platform,
NULL, 0);
if (ret)
- goto err_pm_disable;
+ return ret;
comp_pcm = devm_kzalloc(&pdev->dev, sizeof(*comp_pcm), GFP_KERNEL);
- if (!comp_pcm) {
- ret = -ENOMEM;
- goto err_pm_disable;
- }
+ if (!comp_pcm)
+ return -ENOMEM;
ret = snd_soc_component_initialize(comp_pcm,
&mt8173_afe_pcm_dai_component,
&pdev->dev);
if (ret)
- goto err_pm_disable;
+ return ret;
#ifdef CONFIG_DEBUG_FS
comp_pcm->debugfs_prefix = "pcm";
@@ -1155,7 +1153,7 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
mt8173_afe_pcm_dais,
ARRAY_SIZE(mt8173_afe_pcm_dais));
if (ret)
- goto err_pm_disable;
+ return ret;
comp_hdmi = devm_kzalloc(&pdev->dev, sizeof(*comp_hdmi), GFP_KERNEL);
if (!comp_hdmi) {
@@ -1191,18 +1189,12 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
err_cleanup_components:
snd_soc_unregister_component(&pdev->dev);
-err_pm_disable:
- pm_runtime_disable(&pdev->dev);
return ret;
}
static void mt8173_afe_pcm_dev_remove(struct platform_device *pdev)
{
snd_soc_unregister_component(&pdev->dev);
-
- pm_runtime_disable(&pdev->dev);
- if (!pm_runtime_status_suspended(&pdev->dev))
- mt8173_afe_runtime_suspend(&pdev->dev);
}
static const struct of_device_id mt8173_afe_pcm_dt_match[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-12 8:17 ` Chen-Yu Tsai
2024-01-12 12:14 ` kernel test robot
2024-01-11 10:52 ` [PATCH 3/7] ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
` (6 subsequent siblings)
8 siblings, 2 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Function devm_snd_soc_register_component() allocates a new struct
snd_soc_component, adds components and initializes them; since this
is also devm, it automatically unregisters components and frees
memory upon destruction.
That's exactly what we're doing in the probe function of this driver:
switch to that function instead, allowing to remove the last goto and
to discard the .remove_new() callback for this driver.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 58 +++-------------------
1 file changed, 8 insertions(+), 50 deletions(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
index ea611730de9c..b887e10635fe 100644
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
@@ -1129,72 +1129,31 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
afe->runtime_resume = mt8173_afe_runtime_resume;
afe->runtime_suspend = mt8173_afe_runtime_suspend;
- ret = devm_snd_soc_register_component(&pdev->dev,
- &mtk_afe_pcm_platform,
- NULL, 0);
+ ret = devm_snd_soc_register_component(&pdev->dev, &mtk_afe_pcm_platform, NULL, 0);
if (ret)
return ret;
- comp_pcm = devm_kzalloc(&pdev->dev, sizeof(*comp_pcm), GFP_KERNEL);
- if (!comp_pcm)
- return -ENOMEM;
-
- ret = snd_soc_component_initialize(comp_pcm,
- &mt8173_afe_pcm_dai_component,
- &pdev->dev);
+ ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_pcm_dai_component,
+ mt8173_afe_pcm_dais,
+ ARRAY_SIZE(mt8173_afe_pcm_dais));
if (ret)
return ret;
-#ifdef CONFIG_DEBUG_FS
- comp_pcm->debugfs_prefix = "pcm";
-#endif
-
- ret = snd_soc_add_component(comp_pcm,
- mt8173_afe_pcm_dais,
- ARRAY_SIZE(mt8173_afe_pcm_dais));
+ ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_hdmi_dai_component,
+ mt8173_afe_hdmi_dais,
+ ARRAY_SIZE(mt8173_afe_hdmi_dais));
if (ret)
return ret;
- comp_hdmi = devm_kzalloc(&pdev->dev, sizeof(*comp_hdmi), GFP_KERNEL);
- if (!comp_hdmi) {
- ret = -ENOMEM;
- goto err_cleanup_components;
- }
-
- ret = snd_soc_component_initialize(comp_hdmi,
- &mt8173_afe_hdmi_dai_component,
- &pdev->dev);
- if (ret)
- goto err_cleanup_components;
-
-#ifdef CONFIG_DEBUG_FS
- comp_hdmi->debugfs_prefix = "hdmi";
-#endif
-
- ret = snd_soc_add_component(comp_hdmi,
- mt8173_afe_hdmi_dais,
- ARRAY_SIZE(mt8173_afe_hdmi_dais));
- if (ret)
- goto err_cleanup_components;
-
ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
0, "Afe_ISR_Handle", (void *)afe);
if (ret) {
dev_err(afe->dev, "could not request_irq\n");
- goto err_cleanup_components;
+ return ret;
}
dev_info(&pdev->dev, "MT8173 AFE driver initialized.\n");
return 0;
-
-err_cleanup_components:
- snd_soc_unregister_component(&pdev->dev);
- return ret;
-}
-
-static void mt8173_afe_pcm_dev_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_component(&pdev->dev);
}
static const struct of_device_id mt8173_afe_pcm_dt_match[] = {
@@ -1215,7 +1174,6 @@ static struct platform_driver mt8173_afe_pcm_driver = {
.pm = &mt8173_afe_pm_ops,
},
.probe = mt8173_afe_pcm_dev_probe,
- .remove_new = mt8173_afe_pcm_dev_remove,
};
module_platform_driver(mt8173_afe_pcm_driver);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/7] ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 4/7] ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
` (5 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Switch from pm_runtime_enable() to devm_pm_runtime_enable() to simplify
the probe function and remove the now useless .remove_new() callback.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 57 ++++++++--------------
1 file changed, 20 insertions(+), 37 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
index 9e432ed9124b..d10aabf65a78 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
@@ -1113,32 +1113,33 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
return ret;
}
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
/* regmap init */
afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
if (IS_ERR(afe->regmap)) {
dev_err(dev, "could not get regmap from parent\n");
- ret = PTR_ERR(afe->regmap);
- goto err_pm_disable;
+ return PTR_ERR(afe->regmap);
}
ret = regmap_attach_dev(dev, afe->regmap, &mt8183_afe_regmap_config);
if (ret) {
dev_warn(dev, "regmap_attach_dev fail, ret %d\n", ret);
- goto err_pm_disable;
+ return ret;
}
rstc = devm_reset_control_get(dev, "audiosys");
if (IS_ERR(rstc)) {
ret = PTR_ERR(rstc);
dev_err(dev, "could not get audiosys reset:%d\n", ret);
- goto err_pm_disable;
+ return ret;
}
ret = reset_control_reset(rstc);
if (ret) {
dev_err(dev, "failed to trigger audio reset:%d\n", ret);
- goto err_pm_disable;
+ return ret;
}
/* enable clock for regcache get default value from hw */
@@ -1148,7 +1149,7 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
ret = regmap_reinit_cache(afe->regmap, &mt8183_afe_regmap_config);
if (ret) {
dev_err(dev, "regmap_reinit_cache fail, ret %d\n", ret);
- goto err_pm_disable;
+ return ret;
}
pm_runtime_put_sync(&pdev->dev);
@@ -1161,10 +1162,8 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
afe->memif_size = MT8183_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
GFP_KERNEL);
- if (!afe->memif) {
- ret = -ENOMEM;
- goto err_pm_disable;
- }
+ if (!afe->memif)
+ return -ENOMEM;
for (i = 0; i < afe->memif_size; i++) {
afe->memif[i].data = &memif_data[i];
@@ -1181,26 +1180,22 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
afe->irqs_size = MT8183_IRQ_NUM;
afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
GFP_KERNEL);
- if (!afe->irqs) {
- ret = -ENOMEM;
- goto err_pm_disable;
- }
+ if (!afe->irqs)
+ return -ENOMEM;
for (i = 0; i < afe->irqs_size; i++)
afe->irqs[i].irq_data = &irq_data[i];
/* request irq */
irq_id = platform_get_irq(pdev, 0);
- if (irq_id < 0) {
- ret = irq_id;
- goto err_pm_disable;
- }
+ if (irq_id < 0)
+ return irq_id;
ret = devm_request_irq(dev, irq_id, mt8183_afe_irq_handler,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) {
dev_err(dev, "could not request_irq for asys-isr\n");
- goto err_pm_disable;
+ return ret;
}
/* init sub_dais */
@@ -1211,7 +1206,7 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
if (ret) {
dev_warn(afe->dev, "dai register i %d fail, ret %d\n",
i, ret);
- goto err_pm_disable;
+ return ret;
}
}
@@ -1220,7 +1215,7 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
if (ret) {
dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n",
ret);
- goto err_pm_disable;
+ return ret;
}
afe->mtk_afe_hardware = &mt8183_afe_hardware;
@@ -1236,7 +1231,7 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
NULL, 0);
if (ret) {
dev_warn(dev, "err_platform\n");
- goto err_pm_disable;
+ return ret;
}
ret = devm_snd_soc_register_component(afe->dev,
@@ -1245,21 +1240,10 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
afe->num_dai_drivers);
if (ret) {
dev_warn(dev, "err_dai_component\n");
- goto err_pm_disable;
+ return ret;
}
- return ret;
-
-err_pm_disable:
- pm_runtime_disable(&pdev->dev);
- return ret;
-}
-
-static void mt8183_afe_pcm_dev_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
- if (!pm_runtime_status_suspended(&pdev->dev))
- mt8183_afe_runtime_suspend(&pdev->dev);
+ return 0;
}
static const struct of_device_id mt8183_afe_pcm_dt_match[] = {
@@ -1280,7 +1264,6 @@ static struct platform_driver mt8183_afe_pcm_driver = {
.pm = &mt8183_afe_pm_ops,
},
.probe = mt8183_afe_pcm_dev_probe,
- .remove_new = mt8183_afe_pcm_dev_remove,
};
module_platform_driver(mt8183_afe_pcm_driver);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (2 preceding siblings ...)
2024-01-11 10:52 ` [PATCH 3/7] ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 5/7] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
` (4 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Simplify the probe function by switching error prints to return
dev_err_probe(), lowering the lines count; while at it, also
change some messages level from warn to error.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 71 ++++++++--------------
1 file changed, 24 insertions(+), 47 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
index d10aabf65a78..bca7cb782163 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
@@ -1108,10 +1108,8 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
/* initial audio related clock */
ret = mt8183_init_clock(afe);
- if (ret) {
- dev_err(dev, "init clock error\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "init clock error\n");
ret = devm_pm_runtime_enable(dev);
if (ret)
@@ -1119,38 +1117,29 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
/* regmap init */
afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
- if (IS_ERR(afe->regmap)) {
- dev_err(dev, "could not get regmap from parent\n");
- return PTR_ERR(afe->regmap);
- }
+ if (IS_ERR(afe->regmap))
+ return dev_err_probe(dev, PTR_ERR(afe->regmap),
+ "could not get regmap from parent\n");
+
ret = regmap_attach_dev(dev, afe->regmap, &mt8183_afe_regmap_config);
- if (ret) {
- dev_warn(dev, "regmap_attach_dev fail, ret %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "regmap_attach_dev fail\n");
rstc = devm_reset_control_get(dev, "audiosys");
- if (IS_ERR(rstc)) {
- ret = PTR_ERR(rstc);
- dev_err(dev, "could not get audiosys reset:%d\n", ret);
- return ret;
- }
+ if (IS_ERR(rstc))
+ return dev_err_probe(dev, PTR_ERR(rstc), "could not get audiosys reset\n");
ret = reset_control_reset(rstc);
- if (ret) {
- dev_err(dev, "failed to trigger audio reset:%d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to trigger audio reset\n");
/* enable clock for regcache get default value from hw */
afe_priv->pm_runtime_bypass_reg_ctl = true;
pm_runtime_get_sync(&pdev->dev);
ret = regmap_reinit_cache(afe->regmap, &mt8183_afe_regmap_config);
- if (ret) {
- dev_err(dev, "regmap_reinit_cache fail, ret %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
pm_runtime_put_sync(&pdev->dev);
afe_priv->pm_runtime_bypass_reg_ctl = false;
@@ -1193,30 +1182,22 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
ret = devm_request_irq(dev, irq_id, mt8183_afe_irq_handler,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
- if (ret) {
- dev_err(dev, "could not request_irq for asys-isr\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "could not request_irq for asys-isr\n");
/* init sub_dais */
INIT_LIST_HEAD(&afe->sub_dais);
for (i = 0; i < ARRAY_SIZE(dai_register_cbs); i++) {
ret = dai_register_cbs[i](afe);
- if (ret) {
- dev_warn(afe->dev, "dai register i %d fail, ret %d\n",
- i, ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(afe->dev, ret, "dai register i %d fail\n", i);
}
/* init dai_driver and component_driver */
ret = mtk_afe_combine_sub_dai(afe);
- if (ret) {
- dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n",
- ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(afe->dev, ret, "mtk_afe_combine_sub_dai fail\n");
afe->mtk_afe_hardware = &mt8183_afe_hardware;
afe->memif_fs = mt8183_memif_fs;
@@ -1229,19 +1210,15 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev,
&mt8183_afe_component,
NULL, 0);
- if (ret) {
- dev_warn(dev, "err_platform\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "err_platform\n");
ret = devm_snd_soc_register_component(afe->dev,
&mt8183_afe_pcm_dai_component,
afe->dai_drivers,
afe->num_dai_drivers);
- if (ret) {
- dev_warn(dev, "err_dai_component\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "err_dai_component\n");
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/7] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (3 preceding siblings ...)
2024-01-11 10:52 ` [PATCH 4/7] ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
` (3 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Switch from pm_runtime_enable() to devm_pm_runtime_enable(), allowing
to remove all gotos from the probe function.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 46 ++++++++--------------
1 file changed, 17 insertions(+), 29 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
index bdd1e91824d9..794419d16b01 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
@@ -2217,21 +2217,20 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
return ret;
}
- pm_runtime_enable(&pdev->dev);
- if (!pm_runtime_enabled(&pdev->dev))
- goto err_pm_disable;
+ ret = devm_pm_runtime_enable(&pdev->dev);
+ if (ret)
+ return ret;
/* regmap init */
afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
if (IS_ERR(afe->regmap)) {
dev_err(dev, "could not get regmap from parent\n");
- ret = PTR_ERR(afe->regmap);
- goto err_pm_disable;
+ return PTR_ERR(afe->regmap);
}
ret = regmap_attach_dev(dev, afe->regmap, &mt8192_afe_regmap_config);
if (ret) {
dev_warn(dev, "regmap_attach_dev fail, ret %d\n", ret);
- goto err_pm_disable;
+ return ret;
}
/* enable clock for regcache get default value from hw */
@@ -2241,7 +2240,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config);
if (ret) {
dev_err(dev, "regmap_reinit_cache fail, ret %d\n", ret);
- goto err_pm_disable;
+ return ret;
}
pm_runtime_put_sync(&pdev->dev);
@@ -2254,10 +2253,8 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
afe->memif_size = MT8192_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
GFP_KERNEL);
- if (!afe->memif) {
- ret = -ENOMEM;
- goto err_pm_disable;
- }
+ if (!afe->memif)
+ return -ENOMEM;
for (i = 0; i < afe->memif_size; i++) {
afe->memif[i].data = &memif_data[i];
@@ -2271,26 +2268,22 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
afe->irqs_size = MT8192_IRQ_NUM;
afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
GFP_KERNEL);
- if (!afe->irqs) {
- ret = -ENOMEM;
- goto err_pm_disable;
- }
+ if (!afe->irqs)
+ return -ENOMEM;
for (i = 0; i < afe->irqs_size; i++)
afe->irqs[i].irq_data = &irq_data[i];
/* request irq */
irq_id = platform_get_irq(pdev, 0);
- if (irq_id < 0) {
- ret = irq_id;
- goto err_pm_disable;
- }
+ if (irq_id < 0)
+ return irq_id;
ret = devm_request_irq(dev, irq_id, mt8192_afe_irq_handler,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) {
dev_err(dev, "could not request_irq for Afe_ISR_Handle\n");
- goto err_pm_disable;
+ return ret;
}
/* init sub_dais */
@@ -2301,7 +2294,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
if (ret) {
dev_warn(afe->dev, "dai register i %d fail, ret %d\n",
i, ret);
- goto err_pm_disable;
+ return ret;
}
}
@@ -2310,7 +2303,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
if (ret) {
dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n",
ret);
- goto err_pm_disable;
+ return ret;
}
/* others */
@@ -2329,7 +2322,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
&mt8192_afe_component, NULL, 0);
if (ret) {
dev_warn(dev, "err_platform\n");
- goto err_pm_disable;
+ return ret;
}
ret = devm_snd_soc_register_component(&pdev->dev,
@@ -2338,15 +2331,10 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
afe->num_dai_drivers);
if (ret) {
dev_warn(dev, "err_dai_component\n");
- goto err_pm_disable;
+ return ret;
}
return 0;
-
-err_pm_disable:
- pm_runtime_disable(&pdev->dev);
-
- return ret;
}
static void mt8192_afe_pcm_dev_remove(struct platform_device *pdev)
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (4 preceding siblings ...)
2024-01-11 10:52 ` [PATCH 5/7] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-12 3:13 ` kernel test robot
2024-01-12 8:01 ` kernel test robot
2024-01-11 10:52 ` [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback AngeloGioacchino Del Regno
` (2 subsequent siblings)
8 siblings, 2 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
Simplify the probe function by switching error prints to return
dev_err_probe(), lowering the lines count; while at it, also
beautify some messages and change some others' level from warn
to error.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 65 ++++++++--------------
1 file changed, 22 insertions(+), 43 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
index 794419d16b01..7242e6a4625c 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
@@ -2205,17 +2205,12 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
/* reset controller to reset audio regs before regmap cache */
rstc = devm_reset_control_get_exclusive(dev, "audiosys");
- if (IS_ERR(rstc)) {
- ret = PTR_ERR(rstc);
- dev_err(dev, "could not get audiosys reset:%d\n", ret);
- return ret;
- }
+ if (IS_ERR(rstc))
+ return dev_err_probe(dev, PTR_ERR(rstc), "could not get audiosys reset\n");
ret = reset_control_reset(rstc);
- if (ret) {
- dev_err(dev, "failed to trigger audio reset:%d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to trigger audio reset\n");
ret = devm_pm_runtime_enable(&pdev->dev);
if (ret)
@@ -2223,25 +2218,21 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
/* regmap init */
afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
- if (IS_ERR(afe->regmap)) {
- dev_err(dev, "could not get regmap from parent\n");
- return PTR_ERR(afe->regmap);
- }
+ if (IS_ERR(afe->regmap))
+ return dev_err_probe(dev, PTR_ERR(afe->regmap),
+ "could not get regmap from parent");
+
ret = regmap_attach_dev(dev, afe->regmap, &mt8192_afe_regmap_config);
- if (ret) {
- dev_warn(dev, "regmap_attach_dev fail, ret %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "regmap_attach_dev fail\n");
/* enable clock for regcache get default value from hw */
afe_priv->pm_runtime_bypass_reg_ctl = true;
pm_runtime_get_sync(&pdev->dev);
ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config);
- if (ret) {
- dev_err(dev, "regmap_reinit_cache fail, ret %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
pm_runtime_put_sync(&pdev->dev);
afe_priv->pm_runtime_bypass_reg_ctl = false;
@@ -2281,30 +2272,22 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
ret = devm_request_irq(dev, irq_id, mt8192_afe_irq_handler,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
- if (ret) {
- dev_err(dev, "could not request_irq for Afe_ISR_Handle\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "could not request_irq for Afe_ISR_Handle\n");
/* init sub_dais */
INIT_LIST_HEAD(&afe->sub_dais);
for (i = 0; i < ARRAY_SIZE(dai_register_cbs); i++) {
ret = dai_register_cbs[i](afe);
- if (ret) {
- dev_warn(afe->dev, "dai register i %d fail, ret %d\n",
- i, ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(afe->dev, ret, "dai %d register fail");
}
/* init dai_driver and component_driver */
ret = mtk_afe_combine_sub_dai(afe);
- if (ret) {
- dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n",
- ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(afe->dev, ret, "mtk_afe_combine_sub_dai fail\n");
/* others */
afe->mtk_afe_hardware = &mt8192_afe_hardware;
@@ -2320,19 +2303,15 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
/* register platform */
ret = devm_snd_soc_register_component(&pdev->dev,
&mt8192_afe_component, NULL, 0);
- if (ret) {
- dev_warn(dev, "err_platform\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "Couldn't register AFE component\n");
ret = devm_snd_soc_register_component(&pdev->dev,
&mt8192_afe_pcm_component,
afe->dai_drivers,
afe->num_dai_drivers);
- if (ret) {
- dev_warn(dev, "err_dai_component\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "Couldn't register AFE-PCM component\n");
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (5 preceding siblings ...)
2024-01-11 10:52 ` [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
@ 2024-01-11 10:52 ` AngeloGioacchino Del Regno
2024-01-12 6:13 ` Trevor Wu (吳文良)
2024-02-01 10:08 ` [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
2024-03-26 15:27 ` Mark Brown
8 siblings, 1 reply; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 10:52 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
ribalda, nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx,
nfraprado, alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
As we're calling devm_pm_runtime_enable() in the probe function of this
driver we don't need to disable it on remove as that's devm managed:
drop the .remove_new() callback entirely.
While at it, also add the sentinel comment to the last of_device_id
entry.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
index 620d7ade1992..de848d872ce6 100644
--- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
@@ -3193,16 +3193,9 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
return ret;
}
-static void mt8195_afe_pcm_dev_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
- if (!pm_runtime_status_suspended(&pdev->dev))
- mt8195_afe_runtime_suspend(&pdev->dev);
-}
-
static const struct of_device_id mt8195_afe_pcm_dt_match[] = {
- {.compatible = "mediatek,mt8195-audio", },
- {},
+ { .compatible = "mediatek,mt8195-audio" },
+ { /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, mt8195_afe_pcm_dt_match);
@@ -3218,7 +3211,6 @@ static struct platform_driver mt8195_afe_pcm_driver = {
.pm = &mt8195_afe_pm_ops,
},
.probe = mt8195_afe_pcm_dev_probe,
- .remove_new = mt8195_afe_pcm_dev_remove,
};
module_platform_driver(mt8195_afe_pcm_driver);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
2024-01-11 10:52 ` [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
@ 2024-01-12 3:13 ` kernel test robot
2024-01-12 8:01 ` kernel test robot
1 sibling, 0 replies; 16+ messages in thread
From: kernel test robot @ 2024-01-12 3:13 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, lgirdwood
Cc: oe-kbuild-all, broonie, perex, tiwai, matthias.bgg,
angelogioacchino.delregno, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek
Hi AngeloGioacchino,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on broonie-spi/for-next tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.7 next-20240111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/ASoC-mediatek-mt8173-afe-pcm-Convert-to-devm_pm_runtime_enable/20240111-185734
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20240111105247.117766-7-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240112/202401121019.EC2g0hQM-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401121019.EC2g0hQM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401121019.EC2g0hQM-lkp@intel.com/
All warnings (new ones prefixed by >>):
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c: In function 'mt8192_afe_pcm_dev_probe':
>> sound/soc/mediatek/mt8192/mt8192-afe-pcm.c:2284:67: warning: format '%d' expects a matching 'int' argument [-Wformat=]
2284 | return dev_err_probe(afe->dev, ret, "dai %d register fail");
| ~^
| |
| int
vim +2284 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
2172
2173 static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
2174 {
2175 struct mtk_base_afe *afe;
2176 struct mt8192_afe_private *afe_priv;
2177 struct device *dev;
2178 struct reset_control *rstc;
2179 int i, ret, irq_id;
2180
2181 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
2182 if (ret)
2183 return ret;
2184
2185 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
2186 if (!afe)
2187 return -ENOMEM;
2188 platform_set_drvdata(pdev, afe);
2189
2190 afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv),
2191 GFP_KERNEL);
2192 if (!afe->platform_priv)
2193 return -ENOMEM;
2194 afe_priv = afe->platform_priv;
2195
2196 afe->dev = &pdev->dev;
2197 dev = afe->dev;
2198
2199 /* init audio related clock */
2200 ret = mt8192_init_clock(afe);
2201 if (ret) {
2202 dev_err(dev, "init clock error\n");
2203 return ret;
2204 }
2205
2206 /* reset controller to reset audio regs before regmap cache */
2207 rstc = devm_reset_control_get_exclusive(dev, "audiosys");
2208 if (IS_ERR(rstc))
2209 return dev_err_probe(dev, PTR_ERR(rstc), "could not get audiosys reset\n");
2210
2211 ret = reset_control_reset(rstc);
2212 if (ret)
2213 return dev_err_probe(dev, ret, "failed to trigger audio reset\n");
2214
2215 ret = devm_pm_runtime_enable(&pdev->dev);
2216 if (ret)
2217 return ret;
2218
2219 /* regmap init */
2220 afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
2221 if (IS_ERR(afe->regmap))
2222 return dev_err_probe(dev, PTR_ERR(afe->regmap),
2223 "could not get regmap from parent");
2224
2225 ret = regmap_attach_dev(dev, afe->regmap, &mt8192_afe_regmap_config);
2226 if (ret)
2227 return dev_err_probe(dev, ret, "regmap_attach_dev fail\n");
2228
2229 /* enable clock for regcache get default value from hw */
2230 afe_priv->pm_runtime_bypass_reg_ctl = true;
2231 pm_runtime_get_sync(&pdev->dev);
2232
2233 ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config);
2234 if (ret)
2235 return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
2236
2237 pm_runtime_put_sync(&pdev->dev);
2238 afe_priv->pm_runtime_bypass_reg_ctl = false;
2239
2240 regcache_cache_only(afe->regmap, true);
2241 regcache_mark_dirty(afe->regmap);
2242
2243 /* init memif */
2244 afe->memif_size = MT8192_MEMIF_NUM;
2245 afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
2246 GFP_KERNEL);
2247 if (!afe->memif)
2248 return -ENOMEM;
2249
2250 for (i = 0; i < afe->memif_size; i++) {
2251 afe->memif[i].data = &memif_data[i];
2252 afe->memif[i].irq_usage = memif_irq_usage[i];
2253 afe->memif[i].const_irq = 1;
2254 }
2255
2256 mutex_init(&afe->irq_alloc_lock); /* needed when dynamic irq */
2257
2258 /* init irq */
2259 afe->irqs_size = MT8192_IRQ_NUM;
2260 afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
2261 GFP_KERNEL);
2262 if (!afe->irqs)
2263 return -ENOMEM;
2264
2265 for (i = 0; i < afe->irqs_size; i++)
2266 afe->irqs[i].irq_data = &irq_data[i];
2267
2268 /* request irq */
2269 irq_id = platform_get_irq(pdev, 0);
2270 if (irq_id < 0)
2271 return irq_id;
2272
2273 ret = devm_request_irq(dev, irq_id, mt8192_afe_irq_handler,
2274 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
2275 if (ret)
2276 return dev_err_probe(dev, ret, "could not request_irq for Afe_ISR_Handle\n");
2277
2278 /* init sub_dais */
2279 INIT_LIST_HEAD(&afe->sub_dais);
2280
2281 for (i = 0; i < ARRAY_SIZE(dai_register_cbs); i++) {
2282 ret = dai_register_cbs[i](afe);
2283 if (ret)
> 2284 return dev_err_probe(afe->dev, ret, "dai %d register fail");
2285 }
2286
2287 /* init dai_driver and component_driver */
2288 ret = mtk_afe_combine_sub_dai(afe);
2289 if (ret)
2290 return dev_err_probe(afe->dev, ret, "mtk_afe_combine_sub_dai fail\n");
2291
2292 /* others */
2293 afe->mtk_afe_hardware = &mt8192_afe_hardware;
2294 afe->memif_fs = mt8192_memif_fs;
2295 afe->irq_fs = mt8192_irq_fs;
2296 afe->get_dai_fs = mt8192_get_dai_fs;
2297 afe->get_memif_pbuf_size = mt8192_get_memif_pbuf_size;
2298 afe->memif_32bit_supported = 1;
2299
2300 afe->runtime_resume = mt8192_afe_runtime_resume;
2301 afe->runtime_suspend = mt8192_afe_runtime_suspend;
2302
2303 /* register platform */
2304 ret = devm_snd_soc_register_component(&pdev->dev,
2305 &mt8192_afe_component, NULL, 0);
2306 if (ret)
2307 return dev_err_probe(dev, ret, "Couldn't register AFE component\n");
2308
2309 ret = devm_snd_soc_register_component(&pdev->dev,
2310 &mt8192_afe_pcm_component,
2311 afe->dai_drivers,
2312 afe->num_dai_drivers);
2313 if (ret)
2314 return dev_err_probe(dev, ret, "Couldn't register AFE-PCM component\n");
2315
2316 return 0;
2317 }
2318
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
2024-01-11 10:52 ` [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback AngeloGioacchino Del Regno
@ 2024-01-12 6:13 ` Trevor Wu (吳文良)
0 siblings, 0 replies; 16+ messages in thread
From: Trevor Wu (吳文良) @ 2024-01-12 6:13 UTC (permalink / raw)
To: lgirdwood, angelogioacchino.delregno
Cc: linux-kernel, linux-mediatek, ribalda, u.kleine-koenig,
linux-sound, broonie, tiwai, kuninori.morimoto.gx,
linux-arm-kernel, matthias.bgg, perex, alsa-devel, nicolas.ferre,
nfraprado
On Thu, 2024-01-11 at 11:52 +0100, AngeloGioacchino Del Regno wrote:
> As we're calling devm_pm_runtime_enable() in the probe function of
> this
> driver we don't need to disable it on remove as that's devm managed:
> drop the .remove_new() callback entirely.
>
> While at it, also add the sentinel comment to the last of_device_id
> entry.
>
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
2024-01-11 10:52 ` [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2024-01-12 3:13 ` kernel test robot
@ 2024-01-12 8:01 ` kernel test robot
1 sibling, 0 replies; 16+ messages in thread
From: kernel test robot @ 2024-01-12 8:01 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, lgirdwood
Cc: llvm, oe-kbuild-all, broonie, perex, tiwai, matthias.bgg,
angelogioacchino.delregno, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek
Hi AngeloGioacchino,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on broonie-spi/for-next tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.7 next-20240112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/ASoC-mediatek-mt8173-afe-pcm-Convert-to-devm_pm_runtime_enable/20240111-185734
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20240111105247.117766-7-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240112/202401121548.rwSkkCvR-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 9bde5becb44ea071f5e1fa1f5d4071dc8788b18c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401121548.rwSkkCvR-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401121548.rwSkkCvR-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/mediatek/mt8192/mt8192-afe-pcm.c:2284:46: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
2284 | return dev_err_probe(afe->dev, ret, "dai %d register fail");
| ~^
1 warning generated.
vim +2284 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
2172
2173 static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
2174 {
2175 struct mtk_base_afe *afe;
2176 struct mt8192_afe_private *afe_priv;
2177 struct device *dev;
2178 struct reset_control *rstc;
2179 int i, ret, irq_id;
2180
2181 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
2182 if (ret)
2183 return ret;
2184
2185 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
2186 if (!afe)
2187 return -ENOMEM;
2188 platform_set_drvdata(pdev, afe);
2189
2190 afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv),
2191 GFP_KERNEL);
2192 if (!afe->platform_priv)
2193 return -ENOMEM;
2194 afe_priv = afe->platform_priv;
2195
2196 afe->dev = &pdev->dev;
2197 dev = afe->dev;
2198
2199 /* init audio related clock */
2200 ret = mt8192_init_clock(afe);
2201 if (ret) {
2202 dev_err(dev, "init clock error\n");
2203 return ret;
2204 }
2205
2206 /* reset controller to reset audio regs before regmap cache */
2207 rstc = devm_reset_control_get_exclusive(dev, "audiosys");
2208 if (IS_ERR(rstc))
2209 return dev_err_probe(dev, PTR_ERR(rstc), "could not get audiosys reset\n");
2210
2211 ret = reset_control_reset(rstc);
2212 if (ret)
2213 return dev_err_probe(dev, ret, "failed to trigger audio reset\n");
2214
2215 ret = devm_pm_runtime_enable(&pdev->dev);
2216 if (ret)
2217 return ret;
2218
2219 /* regmap init */
2220 afe->regmap = syscon_node_to_regmap(dev->parent->of_node);
2221 if (IS_ERR(afe->regmap))
2222 return dev_err_probe(dev, PTR_ERR(afe->regmap),
2223 "could not get regmap from parent");
2224
2225 ret = regmap_attach_dev(dev, afe->regmap, &mt8192_afe_regmap_config);
2226 if (ret)
2227 return dev_err_probe(dev, ret, "regmap_attach_dev fail\n");
2228
2229 /* enable clock for regcache get default value from hw */
2230 afe_priv->pm_runtime_bypass_reg_ctl = true;
2231 pm_runtime_get_sync(&pdev->dev);
2232
2233 ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config);
2234 if (ret)
2235 return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
2236
2237 pm_runtime_put_sync(&pdev->dev);
2238 afe_priv->pm_runtime_bypass_reg_ctl = false;
2239
2240 regcache_cache_only(afe->regmap, true);
2241 regcache_mark_dirty(afe->regmap);
2242
2243 /* init memif */
2244 afe->memif_size = MT8192_MEMIF_NUM;
2245 afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
2246 GFP_KERNEL);
2247 if (!afe->memif)
2248 return -ENOMEM;
2249
2250 for (i = 0; i < afe->memif_size; i++) {
2251 afe->memif[i].data = &memif_data[i];
2252 afe->memif[i].irq_usage = memif_irq_usage[i];
2253 afe->memif[i].const_irq = 1;
2254 }
2255
2256 mutex_init(&afe->irq_alloc_lock); /* needed when dynamic irq */
2257
2258 /* init irq */
2259 afe->irqs_size = MT8192_IRQ_NUM;
2260 afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
2261 GFP_KERNEL);
2262 if (!afe->irqs)
2263 return -ENOMEM;
2264
2265 for (i = 0; i < afe->irqs_size; i++)
2266 afe->irqs[i].irq_data = &irq_data[i];
2267
2268 /* request irq */
2269 irq_id = platform_get_irq(pdev, 0);
2270 if (irq_id < 0)
2271 return irq_id;
2272
2273 ret = devm_request_irq(dev, irq_id, mt8192_afe_irq_handler,
2274 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
2275 if (ret)
2276 return dev_err_probe(dev, ret, "could not request_irq for Afe_ISR_Handle\n");
2277
2278 /* init sub_dais */
2279 INIT_LIST_HEAD(&afe->sub_dais);
2280
2281 for (i = 0; i < ARRAY_SIZE(dai_register_cbs); i++) {
2282 ret = dai_register_cbs[i](afe);
2283 if (ret)
> 2284 return dev_err_probe(afe->dev, ret, "dai %d register fail");
2285 }
2286
2287 /* init dai_driver and component_driver */
2288 ret = mtk_afe_combine_sub_dai(afe);
2289 if (ret)
2290 return dev_err_probe(afe->dev, ret, "mtk_afe_combine_sub_dai fail\n");
2291
2292 /* others */
2293 afe->mtk_afe_hardware = &mt8192_afe_hardware;
2294 afe->memif_fs = mt8192_memif_fs;
2295 afe->irq_fs = mt8192_irq_fs;
2296 afe->get_dai_fs = mt8192_get_dai_fs;
2297 afe->get_memif_pbuf_size = mt8192_get_memif_pbuf_size;
2298 afe->memif_32bit_supported = 1;
2299
2300 afe->runtime_resume = mt8192_afe_runtime_resume;
2301 afe->runtime_suspend = mt8192_afe_runtime_suspend;
2302
2303 /* register platform */
2304 ret = devm_snd_soc_register_component(&pdev->dev,
2305 &mt8192_afe_component, NULL, 0);
2306 if (ret)
2307 return dev_err_probe(dev, ret, "Couldn't register AFE component\n");
2308
2309 ret = devm_snd_soc_register_component(&pdev->dev,
2310 &mt8192_afe_pcm_component,
2311 afe->dai_drivers,
2312 afe->num_dai_drivers);
2313 if (ret)
2314 return dev_err_probe(dev, ret, "Couldn't register AFE-PCM component\n");
2315
2316 return 0;
2317 }
2318
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
2024-01-11 10:52 ` [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component() AngeloGioacchino Del Regno
@ 2024-01-12 8:17 ` Chen-Yu Tsai
2024-01-12 12:14 ` kernel test robot
1 sibling, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2024-01-12 8:17 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: lgirdwood, broonie, perex, tiwai, matthias.bgg, ribalda,
nicolas.ferre, u.kleine-koenig, kuninori.morimoto.gx, nfraprado,
alsa-devel, trevor.wu, linux-sound, linux-kernel,
linux-arm-kernel, linux-mediatek
On Thu, Jan 11, 2024 at 6:53 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Function devm_snd_soc_register_component() allocates a new struct
> snd_soc_component, adds components and initializes them; since this
> is also devm, it automatically unregisters components and frees
> memory upon destruction.
>
> That's exactly what we're doing in the probe function of this driver:
> switch to that function instead, allowing to remove the last goto and
> to discard the .remove_new() callback for this driver.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 58 +++-------------------
> 1 file changed, 8 insertions(+), 50 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
> index ea611730de9c..b887e10635fe 100644
> --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
> +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
> @@ -1129,72 +1129,31 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
> afe->runtime_resume = mt8173_afe_runtime_resume;
> afe->runtime_suspend = mt8173_afe_runtime_suspend;
>
> - ret = devm_snd_soc_register_component(&pdev->dev,
> - &mtk_afe_pcm_platform,
> - NULL, 0);
> + ret = devm_snd_soc_register_component(&pdev->dev, &mtk_afe_pcm_platform, NULL, 0);
> if (ret)
> return ret;
>
> - comp_pcm = devm_kzalloc(&pdev->dev, sizeof(*comp_pcm), GFP_KERNEL);
> - if (!comp_pcm)
> - return -ENOMEM;
> -
> - ret = snd_soc_component_initialize(comp_pcm,
> - &mt8173_afe_pcm_dai_component,
> - &pdev->dev);
> + ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_pcm_dai_component,
> + mt8173_afe_pcm_dais,
> + ARRAY_SIZE(mt8173_afe_pcm_dais));
> if (ret)
> return ret;
>
> -#ifdef CONFIG_DEBUG_FS
> - comp_pcm->debugfs_prefix = "pcm";
> -#endif
To match existing behavior, can you move this to the component driver?
In snd_soc_component_initialize(), component->debugfs_prefix will take
component_driver->debugfs_prefix as default if it is not set.
Same for the HDMI component.
ChenYu
> -
> - ret = snd_soc_add_component(comp_pcm,
> - mt8173_afe_pcm_dais,
> - ARRAY_SIZE(mt8173_afe_pcm_dais));
> + ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_hdmi_dai_component,
> + mt8173_afe_hdmi_dais,
> + ARRAY_SIZE(mt8173_afe_hdmi_dais));
> if (ret)
> return ret;
>
> - comp_hdmi = devm_kzalloc(&pdev->dev, sizeof(*comp_hdmi), GFP_KERNEL);
> - if (!comp_hdmi) {
> - ret = -ENOMEM;
> - goto err_cleanup_components;
> - }
> -
> - ret = snd_soc_component_initialize(comp_hdmi,
> - &mt8173_afe_hdmi_dai_component,
> - &pdev->dev);
> - if (ret)
> - goto err_cleanup_components;
> -
> -#ifdef CONFIG_DEBUG_FS
> - comp_hdmi->debugfs_prefix = "hdmi";
> -#endif
> -
> - ret = snd_soc_add_component(comp_hdmi,
> - mt8173_afe_hdmi_dais,
> - ARRAY_SIZE(mt8173_afe_hdmi_dais));
> - if (ret)
> - goto err_cleanup_components;
> -
> ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
> 0, "Afe_ISR_Handle", (void *)afe);
> if (ret) {
> dev_err(afe->dev, "could not request_irq\n");
> - goto err_cleanup_components;
> + return ret;
> }
>
> dev_info(&pdev->dev, "MT8173 AFE driver initialized.\n");
> return 0;
> -
> -err_cleanup_components:
> - snd_soc_unregister_component(&pdev->dev);
> - return ret;
> -}
> -
> -static void mt8173_afe_pcm_dev_remove(struct platform_device *pdev)
> -{
> - snd_soc_unregister_component(&pdev->dev);
> }
>
> static const struct of_device_id mt8173_afe_pcm_dt_match[] = {
> @@ -1215,7 +1174,6 @@ static struct platform_driver mt8173_afe_pcm_driver = {
> .pm = &mt8173_afe_pm_ops,
> },
> .probe = mt8173_afe_pcm_dev_probe,
> - .remove_new = mt8173_afe_pcm_dev_remove,
> };
>
> module_platform_driver(mt8173_afe_pcm_driver);
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
2024-01-11 10:52 ` [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component() AngeloGioacchino Del Regno
2024-01-12 8:17 ` Chen-Yu Tsai
@ 2024-01-12 12:14 ` kernel test robot
1 sibling, 0 replies; 16+ messages in thread
From: kernel test robot @ 2024-01-12 12:14 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, lgirdwood
Cc: oe-kbuild-all, broonie, perex, tiwai, matthias.bgg,
angelogioacchino.delregno, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek
Hi AngeloGioacchino,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on broonie-spi/for-next tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.7 next-20240112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/ASoC-mediatek-mt8173-afe-pcm-Convert-to-devm_pm_runtime_enable/20240111-185734
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20240111105247.117766-3-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20240112/202401122053.qrF0V1zz-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401122053.qrF0V1zz-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401122053.qrF0V1zz-lkp@intel.com/
All warnings (new ones prefixed by >>):
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c: In function 'mt8173_afe_pcm_dev_probe':
>> sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:1055:46: warning: unused variable 'comp_hdmi' [-Wunused-variable]
1055 | struct snd_soc_component *comp_pcm, *comp_hdmi;
| ^~~~~~~~~
>> sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:1055:35: warning: unused variable 'comp_pcm' [-Wunused-variable]
1055 | struct snd_soc_component *comp_pcm, *comp_hdmi;
| ^~~~~~~~
vim +/comp_hdmi +1055 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1048
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1049 static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1050 {
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1051 int ret, i;
d6e2c4ffdf67de6 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Arvind Yadav 2017-11-29 1052 int irq_id;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1053 struct mtk_base_afe *afe;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1054 struct mt8173_afe_private *afe_priv;
8c32984bc7da298 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2021-11-11 @1055 struct snd_soc_component *comp_pcm, *comp_hdmi;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1056
fcde5a7eca1a28d sound/soc/mediatek/mtk-afe-pcm.c PC Liao 2016-01-12 1057 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(33));
fcde5a7eca1a28d sound/soc/mediatek/mtk-afe-pcm.c PC Liao 2016-01-12 1058 if (ret)
fcde5a7eca1a28d sound/soc/mediatek/mtk-afe-pcm.c PC Liao 2016-01-12 1059 return ret;
fcde5a7eca1a28d sound/soc/mediatek/mtk-afe-pcm.c PC Liao 2016-01-12 1060
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1061 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1062 if (!afe)
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1063 return -ENOMEM;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1064
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1065 afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv),
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1066 GFP_KERNEL);
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1067 afe_priv = afe->platform_priv;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1068 if (!afe_priv)
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1069 return -ENOMEM;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1070
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1071 afe->dev = &pdev->dev;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1072
f9c058d14f4fe23 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda Delgado 2023-06-12 1073 irq_id = platform_get_irq(pdev, 0);
f9c058d14f4fe23 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda Delgado 2023-06-12 1074 if (irq_id <= 0)
f9c058d14f4fe23 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda Delgado 2023-06-12 1075 return irq_id < 0 ? irq_id : -ENXIO;
f9c058d14f4fe23 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda Delgado 2023-06-12 1076
fceef72b68d6359 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c YueHaibing 2019-07-27 1077 afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1078 if (IS_ERR(afe->base_addr))
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1079 return PTR_ERR(afe->base_addr);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1080
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1081 afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr,
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1082 &mt8173_afe_regmap_config);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1083 if (IS_ERR(afe->regmap))
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1084 return PTR_ERR(afe->regmap);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1085
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1086 /* initial audio related clock */
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1087 ret = mt8173_afe_init_audio_clk(afe);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1088 if (ret) {
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1089 dev_err(afe->dev, "mt8173_afe_init_audio_clk fail\n");
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1090 return ret;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1091 }
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1092
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1093 /* memif % irq initialize*/
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1094 afe->memif_size = MT8173_AFE_MEMIF_NUM;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1095 afe->memif = devm_kcalloc(afe->dev, afe->memif_size,
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1096 sizeof(*afe->memif), GFP_KERNEL);
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1097 if (!afe->memif)
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1098 return -ENOMEM;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1099
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1100 afe->irqs_size = MT8173_AFE_IRQ_NUM;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1101 afe->irqs = devm_kcalloc(afe->dev, afe->irqs_size,
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1102 sizeof(*afe->irqs), GFP_KERNEL);
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1103 if (!afe->irqs)
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1104 return -ENOMEM;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1105
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1106 for (i = 0; i < afe->irqs_size; i++) {
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1107 afe->memif[i].data = &memif_data[i];
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1108 afe->irqs[i].irq_data = &irq_data[i];
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1109 afe->irqs[i].irq_occupyed = true;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1110 afe->memif[i].irq_usage = i;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1111 afe->memif[i].const_irq = 1;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1112 }
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1113
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1114 afe->mtk_afe_hardware = &mt8173_afe_hardware;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1115 afe->memif_fs = mt8173_memif_fs;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1116 afe->irq_fs = mt8173_irq_fs;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1117
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1118 platform_set_drvdata(pdev, afe);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1119
c1042de5f13fba4 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1120 ret = devm_pm_runtime_enable(&pdev->dev);
c1042de5f13fba4 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1121 if (ret) {
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1122 ret = mt8173_afe_runtime_resume(&pdev->dev);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1123 if (ret)
c1042de5f13fba4 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1124 return ret;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1125 }
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1126
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1127 afe->reg_back_up_list = mt8173_afe_backup_list;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1128 afe->reg_back_up_list_num = ARRAY_SIZE(mt8173_afe_backup_list);
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1129 afe->runtime_resume = mt8173_afe_runtime_resume;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1130 afe->runtime_suspend = mt8173_afe_runtime_suspend;
6b1e19d91d0bf30 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1131
6d3a9de1e62bd25 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1132 ret = devm_snd_soc_register_component(&pdev->dev, &mtk_afe_pcm_platform, NULL, 0);
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1133 if (ret)
c1042de5f13fba4 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1134 return ret;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1135
6d3a9de1e62bd25 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1136 ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_pcm_dai_component,
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1137 mt8173_afe_pcm_dais,
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1138 ARRAY_SIZE(mt8173_afe_pcm_dais));
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1139 if (ret)
c1042de5f13fba4 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1140 return ret;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1141
6d3a9de1e62bd25 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1142 ret = devm_snd_soc_register_component(&pdev->dev, &mt8173_afe_hdmi_dai_component,
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1143 mt8173_afe_hdmi_dais,
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1144 ARRAY_SIZE(mt8173_afe_hdmi_dais));
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1145 if (ret)
6d3a9de1e62bd25 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1146 return ret;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1147
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1148 ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1149 0, "Afe_ISR_Handle", (void *)afe);
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1150 if (ret) {
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1151 dev_err(afe->dev, "could not request_irq\n");
6d3a9de1e62bd25 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c AngeloGioacchino Del Regno 2024-01-11 1152 return ret;
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1153 }
4cbb264d4e9136a sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Ricardo Ribalda 2022-11-28 1154
0d1d7a664288f9c sound/soc/mediatek/mt8173/mt8173-afe-pcm.c Garlic Tseng 2016-06-17 1155 dev_info(&pdev->dev, "MT8173 AFE driver initialized.\n");
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1156 return 0;
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1157 }
ee0bcaff109f36d sound/soc/mediatek/mtk-afe-pcm.c Koro Chen 2015-06-15 1158
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (6 preceding siblings ...)
2024-01-11 10:52 ` [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback AngeloGioacchino Del Regno
@ 2024-02-01 10:08 ` AngeloGioacchino Del Regno
2024-02-01 11:25 ` Mark Brown
2024-03-26 15:27 ` Mark Brown
8 siblings, 1 reply; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-01 10:08 UTC (permalink / raw)
To: broonie
Cc: perex, tiwai, matthias.bgg, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek, lgirdwood
Il 11/01/24 11:52, AngeloGioacchino Del Regno ha scritto:
> This series converts MediaTek AFE drivers' probe functions to use
> dev_err_probe() and devm functions where possible and, in some
> cases, dropping the .remove_new() callback, reducing the size.
>
> Cheers!
Gentle ping for this series, afraid that went out of the radar :-)
Cheers,
Angelo
>
> AngeloGioacchino Del Regno (7):
> ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
> ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe()
> ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
> ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
>
> sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 78 +++------------
> sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 108 +++++++--------------
> sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 95 ++++++------------
> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 12 +--
> 4 files changed, 81 insertions(+), 212 deletions(-)
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups
2024-02-01 10:08 ` [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
@ 2024-02-01 11:25 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2024-02-01 11:25 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: perex, tiwai, matthias.bgg, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek, lgirdwood
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
On Thu, Feb 01, 2024 at 11:08:41AM +0100, AngeloGioacchino Del Regno wrote:
> Il 11/01/24 11:52, AngeloGioacchino Del Regno ha scritto:
> > This series converts MediaTek AFE drivers' probe functions to use
> > dev_err_probe() and devm functions where possible and, in some
> > cases, dropping the .remove_new() callback, reducing the size.
> Gentle ping for this series, afraid that went out of the radar :-)
Please don't send content free pings and please allow a reasonable time
for review. People get busy, go on holiday, attend conferences and so
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review. If there have been
review comments then people may be waiting for those to be addressed.
Sending content free pings adds to the mail volume (if they are seen at
all) which is often the problem and since they can't be reviewed
directly if something has gone wrong you'll have to resend the patches
anyway, so sending again is generally a better approach though there are
some other maintainers who like them - if in doubt look at how patches
for the subsystem are normally handled.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
` (7 preceding siblings ...)
2024-02-01 10:08 ` [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
@ 2024-03-26 15:27 ` Mark Brown
8 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2024-03-26 15:27 UTC (permalink / raw)
To: lgirdwood, AngeloGioacchino Del Regno
Cc: perex, tiwai, matthias.bgg, ribalda, nicolas.ferre,
u.kleine-koenig, kuninori.morimoto.gx, nfraprado, alsa-devel,
trevor.wu, linux-sound, linux-kernel, linux-arm-kernel,
linux-mediatek
On Thu, 11 Jan 2024 11:52:40 +0100, AngeloGioacchino Del Regno wrote:
> This series converts MediaTek AFE drivers' probe functions to use
> dev_err_probe() and devm functions where possible and, in some
> cases, dropping the .remove_new() callback, reducing the size.
>
> Cheers!
>
> AngeloGioacchino Del Regno (7):
> ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
> ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe()
> ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
> ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
> ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable()
(no commit info)
[2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component()
(no commit info)
[3/7] ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable()
(no commit info)
[4/7] ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe()
(no commit info)
[5/7] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
commit: 7aaaa22de56ce0dae15fd9f42a69a1d1a7a6e078
[6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
commit: 324c603a4efca7d1045e0bf3477ca54970eac72c
[7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback
(no commit info)
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-03-26 15:27 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 10:52 [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 1/7] ASoC: mediatek: mt8173-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 2/7] ASoC: mediatek: mt8173-afe-pcm: Use devm_snd_soc_register_component() AngeloGioacchino Del Regno
2024-01-12 8:17 ` Chen-Yu Tsai
2024-01-12 12:14 ` kernel test robot
2024-01-11 10:52 ` [PATCH 3/7] ASoC: mediatek: mt8183-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 4/7] ASoC: mediatek: mt8183-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 5/7] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
2024-01-11 10:52 ` [PATCH 6/7] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2024-01-12 3:13 ` kernel test robot
2024-01-12 8:01 ` kernel test robot
2024-01-11 10:52 ` [PATCH 7/7] ASoC: mediatek: mt8195-afe-pcm: Drop .remove_new() callback AngeloGioacchino Del Regno
2024-01-12 6:13 ` Trevor Wu (吳文良)
2024-02-01 10:08 ` [PATCH 0/7] ASoC: mediatek: AFE drivers cleanups AngeloGioacchino Del Regno
2024-02-01 11:25 ` Mark Brown
2024-03-26 15:27 ` Mark Brown
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).