mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	andriy.shevchenko@linux.intel.com,
	kuninori.morimoto.gx@renesas.com, nichen@iscas.ac.cn,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	ckeepax@opensource.cirrus.com
Subject: Re: [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens
Date: Tue, 2 Dec 2025 13:37:34 +0000	[thread overview]
Message-ID: <7d926b4a-2fde-4411-9f4c-e12a9a2fcb81@sirena.org.uk> (raw)
In-Reply-To: <20251202083535.1985714-2-shengjiu.wang@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, Dec 02, 2025 at 04:35:34PM +0800, Shengjiu Wang wrote:

> --- a/sound/soc/codecs/ak4458.c
> +++ b/sound/soc/codecs/ak4458.c
> @@ -671,7 +671,14 @@ static int ak4458_runtime_resume(struct device *dev)
>  	regcache_cache_only(ak4458->regmap, false);
>  	regcache_mark_dirty(ak4458->regmap);
>  
> -	return regcache_sync(ak4458->regmap);
> +	ret = regcache_sync(ak4458->regmap);
> +	if (ret)
> +		goto err;
> +
> +	return 0;
> +err:
> +	regulator_bulk_disable(ARRAY_SIZE(ak4458->supplies), ak4458->supplies);
> +	return ret;

While we're at it we should also put the regmap back into cache only
mode, not that the error is likely to be usefully recoverable.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-12-02 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  8:35 [PATCH 0/2] ASoC: ak4458 & ak5558: disable regulator if error Shengjiu Wang
2025-12-02  8:35 ` [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens Shengjiu Wang
2025-12-02 13:37   ` Mark Brown [this message]
2025-12-03  6:09     ` Shengjiu Wang
2025-12-02 14:13   ` Andy Shevchenko
2025-12-02  8:35 ` [PATCH 2/2] ASoC: ak5558: " Shengjiu Wang

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=7d926b4a-2fde-4411-9f4c-e12a9a2fcb81@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@nxp.com \
    --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

all inboxes | Powered by JetHome®