[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA+D8AMOGxf8Ln0vHhD_c=0WJ2haWStLqYqEnQS0NPfm1=3L=Q@mail.gmail.com>
Date: Wed, 3 Dec 2025 14:09:49 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Shengjiu Wang <shengjiu.wang@....com>, lgirdwood@...il.com, perex@...ex.cz,
tiwai@...e.com, andriy.shevchenko@...ux.intel.com,
kuninori.morimoto.gx@...esas.com, nichen@...as.ac.cn,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
ckeepax@...nsource.cirrus.com
Subject: Re: [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens
On Tue, Dec 2, 2025 at 9:38 PM Mark Brown <broonie@...nel.org> wrote:
>
> 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.
Thanks, I will update it.
Best regards
Shengjiu Wang
Powered by blists - more mailing lists