From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com,
ckeepax@opensource.cirrus.com, patches@opensource.cirrus.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
m.szyprowski@samsung.com, b.zolnierkie@samsung.com
Subject: Re: [PATCH 2/2] ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions
Date: Fri, 28 Aug 2020 11:10:04 +0200 [thread overview]
Message-ID: <20200828091004.GA17786@pi3> (raw)
In-Reply-To: <28723053-c305-d359-3862-656ade11bf74@samsung.com>
On Fri, Aug 28, 2020 at 10:50:33AM +0200, Sylwester Nawrocki wrote:
> On 28.08.2020 08:48, Krzysztof Kozlowski wrote:
> >> diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
> >> index b3ba053..fc9ea19 100644
> >> --- a/sound/soc/codecs/wm8994.c
> >> +++ b/sound/soc/codecs/wm8994.c
> >> @@ -3514,6 +3514,8 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
> >> return -EINVAL;
> >> }
> >>
> >> + pm_runtime_get_sync(component->dev);
>
> > The driver enables PM runtime unconditionally so you should probably
> > handle the error code here. I know that driver does not do it in other
> > cases but it should not be a reason to multiple this pattern... unless
> > it really does not matter as there are no runtime PM ops?
>
> The regmap is provided by the parent MFD device (drivers/mfd/wm8994-core.c)
> and that is where those runtime PM calls get propagated, we could possibly
> get en error if there is something wrong with resuming the parent device.
>
> If you don't mind I would prefer to omit the return value tests in that
> fix patch. Existing callers of the wm89*_mic_detect() functions are
> ignoring the return value anyway. Probably the checks could be added
> in a separate patch.
I don't mind.
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2020-08-28 9:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200827173411eucas1p1283200677c5e077c5e07af938934eb5d@eucas1p1.samsung.com>
2020-08-27 17:33 ` [PATCH 1/2] ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811 Sylwester Nawrocki
2020-08-27 17:33 ` [PATCH 2/2] ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions Sylwester Nawrocki
2020-08-28 6:48 ` Krzysztof Kozlowski
2020-08-28 8:50 ` Sylwester Nawrocki
2020-08-28 9:10 ` Krzysztof Kozlowski [this message]
2020-08-28 15:53 ` Charles Keepax
2020-08-28 6:41 ` [PATCH 1/2] ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811 Krzysztof Kozlowski
2020-08-28 15:48 ` Charles Keepax
2020-09-01 14:49 ` Mark Brown
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=20200828091004.GA17786@pi3 \
--to=krzk@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=patches@opensource.cirrus.com \
--cc=s.nawrocki@samsung.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