From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: robh@kernel.org, alsa-devel@alsa-project.org,
ckeepax@opensource.cirrus.com, Zhu Ning <zhuning0077@gmail.com>,
devicetree@vger.kernel.org, tiwai@suse.com,
Zhu Ning <zhuning@everest-semi.com>,
David Yang <yangxiaohua@everest-semi.com>
Subject: Re: [PATCH v3 1/2] ASoC: codecs: add support for ES8326
Date: Tue, 26 Jul 2022 10:06:30 -0500 [thread overview]
Message-ID: <372a1c8c-b70c-c5f9-3a0b-a4d554d5acf2@linux.intel.com> (raw)
In-Reply-To: <YuAApMG8XbxOoGIv@sirena.org.uk>
On 7/26/22 09:56, Mark Brown wrote:
> On Tue, Jul 26, 2022 at 09:06:10AM -0500, Pierre-Louis Bossart wrote:
>> Much improved version, thank you. See additional comments/questions below.
>
>>> + regmap_write(es8326->regmap, ES8326_CLK_CTL_01, ES8326_CLK_OFF);
>>> + regcache_cache_only(es8326->regmap, true);
>>> + regcache_mark_dirty(es8326->regmap);
>>> +
>>> + return 0;
>>> +}
>
>> One question on the interrupt handling: should there be an interrupt
>> disable on suspend and conversely an interrupt enable on resume?
>
> That shouldn't be needed (in general the interrupt enable/disable stuff
> shouldn't be needed at all).
isn't there a risk of an interrupt being triggered after all the jack
detection resources are disabled?
>
>>> + ret = clk_prepare_enable(es8326->mclk);
>>> + if (ret) {
>>> + dev_err(&i2c->dev, "unable to enable mclk\n");
>>> + return ret;
>>> + }
>
>> I am not really following what happens if es8326->mclk is NULL. Why
>> would you call clk_prepare_enable() with a NULL pointer? If you look at
>> the code in es8326_set_bias_level(), you do test for that case, so why
>> not here? Something's not right here.
>
>> Could it be that this is a scope issue? This block should be moved under
>> the scope of the if (!es8236->mclk) test, no?
>
> The clock API will happily consume NULL clocks (it uses NULL as an
> equivalent to the regulator API's dummy regulator), there's no *need* to
> skip clock handling if you've got a NULL clock.
Right, so the code in es8326_set_bias_level() can remove the tests for a
NULL mclk.
prev parent reply other threads:[~2022-07-26 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 13:17 [PATCH v3 1/2] ASoC: codecs: add support for ES8326 Zhu Ning
2022-07-26 13:17 ` [PATCH v3 2/2] ASoC: dt-bindings: Add Everest ES8326 audio CODEC Zhu Ning
2022-07-27 15:22 ` Rob Herring
2022-07-26 13:43 ` [PATCH v3 1/2] ASoC: codecs: add support for ES8326 Mark Brown
2022-07-26 14:06 ` Pierre-Louis Bossart
2022-07-26 14:56 ` Mark Brown
2022-07-26 15:06 ` Pierre-Louis Bossart [this message]
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=372a1c8c-b70c-c5f9-3a0b-a4d554d5acf2@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
--cc=yangxiaohua@everest-semi.com \
--cc=zhuning0077@gmail.com \
--cc=zhuning@everest-semi.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;
as well as URLs for NNTP newsgroup(s).