From: Takashi Iwai <tiwai@suse.de>
To: perex@perex.cz
Cc: Mark Brown <broonie@kernel.org>,
postmaster@alsa-project.org,
sound-open-firmware-owner@alsa-project.org,
alsa-devel@alsa-project.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
sound-open-firmware@alsa-project.org
Subject: Re: [alsa-devel@alsa-project.org: [PATCH 3/5] ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe]
Date: Thu, 04 May 2023 09:35:38 +0200 [thread overview]
Message-ID: <87o7n0mtv9.wl-tiwai@suse.de> (raw)
In-Reply-To: <ZFMF2cD3nPgpZOpa@finisterre.sirena.org.uk>
On Thu, 04 May 2023 03:09:45 +0200,
Mark Brown wrote:
>
> Hi,
>
> Here's another mail (one of several in this series) that got completely
> mangled by the alsa-project.org mailman to the point of unusability. I
> didn't see any response to my last mail about this, is there any news on
> fixing mailman to not do this? It's extremely disruptive to working
> with lore.
It seems that alsa-project.org mailman re-sends the post with
xxx@alsa-project.org address sometimes, indeed. I don't know the
condition, but now I noticed it while checking the pending approvals.
Those that appeared in the list wrongly were likely the posts I
approved without knowing them being superfluously resent ones.
Jaroslav, could you check your mailman configuration?
thanks,
Takashi
> Thanks,
> Mark
> Subject: [PATCH 3/5] ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe
> From: AngeloGioacchino Del Regno via Alsa-devel <alsa-devel@alsa-project.org>
> Date: Wed, 03 May 2023 13:34:11 +0200
> Message-Id: <168311377075.26.14919941665402646886@mailman-core.alsa-project.org>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
>
> Use devm_pm_runtime_enable() and pm_runtime_resume_and_get() to
> to simplify the probe function.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
> index 9e45efeada55..a54c16e0aa05 100644
> --- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
> +++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
> @@ -3179,16 +3179,16 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
>
> mt8195_afe_parse_of(afe, pdev->dev.of_node);
>
> - pm_runtime_enable(dev);
> - if (!pm_runtime_enabled(dev)) {
> - ret = mt8195_afe_runtime_resume(dev);
> - if (ret)
> - return ret;
> - }
> -
> /* enable clock for regcache get default value from hw */
> afe_priv->pm_runtime_bypass_reg_ctl = true;
> - pm_runtime_get_sync(dev);
> +
> + ret = devm_pm_runtime_enable(dev);
> + if (ret)
> + return ret;
> +
> + ret = pm_runtime_resume_and_get(dev);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to resume device\n");
>
> afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr,
> &mt8195_afe_regmap_config);
> @@ -3238,7 +3238,10 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
>
> mt8195_afe_init_registers(afe);
>
> - pm_runtime_put_sync(dev);
> + ret = pm_runtime_put_sync(dev);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to suspend device\n");
> +
> afe_priv->pm_runtime_bypass_reg_ctl = false;
>
> regcache_cache_only(afe->regmap, true);
> @@ -3248,7 +3251,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
>
> err_pm_put:
> pm_runtime_put_sync(dev);
> - pm_runtime_disable(dev);
>
> return ret;
> }
> --
> 2.40.1
next prev parent reply other threads:[~2023-05-04 7:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 1:09 [alsa-devel@alsa-project.org: [PATCH 3/5] ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe] Mark Brown
2023-05-04 7:35 ` Takashi Iwai [this message]
2023-05-04 7:58 ` Takashi Iwai
2023-05-08 7:52 ` Takashi Iwai
2023-05-09 7:12 ` DMARC (Was: Re: [alsa-devel@alsa-project.org: [PATCH 3/5] ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe]) Jaroslav Kysela
2023-05-09 9:37 ` Mark Brown
2023-05-09 9:54 ` Jaroslav Kysela
2023-05-09 14:35 ` Mark Brown
2023-05-09 18:03 ` Jaroslav Kysela
2023-05-09 18:26 ` Konstantin Ryabitsev
2023-05-10 2:05 ` Mark Brown
2023-05-10 3:33 ` Chen-Yu Tsai
2023-05-10 3:58 ` Geraldo Nascimento
2023-05-10 6:17 ` Jaroslav Kysela
2023-05-10 15:13 ` Konstantin Ryabitsev
2023-05-10 17:15 ` Geraldo Nascimento
2023-05-09 18:22 ` Konstantin Ryabitsev
2023-05-10 7:50 ` Jaroslav Kysela
2023-05-10 15:34 ` Konstantin Ryabitsev
2023-05-10 16:19 ` Jaroslav Kysela
2023-05-10 16:43 ` Konstantin Ryabitsev
2023-05-10 18:38 ` Jaroslav Kysela
2023-05-11 5:58 ` Mark Brown
2023-05-09 17:51 ` Geraldo Nascimento
2023-05-10 3:01 ` Chen-Yu Tsai
2023-05-10 6:46 ` Jaroslav Kysela
2023-05-05 20:38 ` [alsa-devel@alsa-project.org: [PATCH 3/5] ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe] Geraldo Nascimento
2023-05-06 0:13 ` Mark Brown
2023-05-06 2:17 ` Geraldo Nascimento
2023-05-07 23:33 ` Mark Brown
2023-05-07 23:38 ` Geraldo Nascimento
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=87o7n0mtv9.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=perex@perex.cz \
--cc=postmaster@alsa-project.org \
--cc=sound-open-firmware-owner@alsa-project.org \
--cc=sound-open-firmware@alsa-project.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 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.