All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	broonie@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org
Subject: Re: [PATCH v2 2/6] ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro
Date: Tue, 3 Nov 2020 12:31:41 +0000	[thread overview]
Message-ID: <0bce847c-6437-9d12-6d54-d9ee99c7e896@linaro.org> (raw)
In-Reply-To: <13987e14-0bd9-9659-b574-d3b7446bb789@linux.intel.com>



On 29/10/2020 15:47, Pierre-Louis Bossart wrote:
>> +static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool 
>> mclk_enable)
>> +{
>> +    struct regmap *regmap = wsa->regmap;
>> +
>> +    if (mclk_enable) {
>> +        if (wsa->wsa_mclk_users == 0) {
>> +            regcache_mark_dirty(regmap);
>> +            regcache_sync_region(regmap, 0x0, WSA_MAX_OFFSET);
> 
> I am not a regcache/regmap expert but the sequence seems odd. I could be 
> wrong, but one would typically sync *after* doing changes, no?

In this code path the MCLK is going from OFF to ON state, so the 
registers would be put in reset state, so we need to sync them with 
current cache state!

--srini


WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	broonie@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	robh+dt@kernel.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/6] ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro
Date: Tue, 3 Nov 2020 12:31:41 +0000	[thread overview]
Message-ID: <0bce847c-6437-9d12-6d54-d9ee99c7e896@linaro.org> (raw)
In-Reply-To: <13987e14-0bd9-9659-b574-d3b7446bb789@linux.intel.com>



On 29/10/2020 15:47, Pierre-Louis Bossart wrote:
>> +static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool 
>> mclk_enable)
>> +{
>> +    struct regmap *regmap = wsa->regmap;
>> +
>> +    if (mclk_enable) {
>> +        if (wsa->wsa_mclk_users == 0) {
>> +            regcache_mark_dirty(regmap);
>> +            regcache_sync_region(regmap, 0x0, WSA_MAX_OFFSET);
> 
> I am not a regcache/regmap expert but the sequence seems odd. I could be 
> wrong, but one would typically sync *after* doing changes, no?

In this code path the MCLK is going from OFF to ON state, so the 
registers would be put in reset state, so we need to sync them with 
current cache state!

--srini


  reply	other threads:[~2020-11-03 12:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 11:08 [PATCH v2 0/6] ASoC: codecs: add support for LPASS Codec macros Srinivas Kandagatla
2020-10-29 11:08 ` Srinivas Kandagatla
2020-10-29 11:08 ` [PATCH v2 1/6] ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla
2020-11-04 21:20   ` Rob Herring
2020-11-04 21:20     ` Rob Herring
2020-10-29 11:08 ` [PATCH v2 2/6] ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla
2020-10-29 15:47   ` Pierre-Louis Bossart
2020-10-29 15:47     ` Pierre-Louis Bossart
2020-11-03 12:31     ` Srinivas Kandagatla [this message]
2020-11-03 12:31       ` Srinivas Kandagatla
2020-10-29 11:08 ` [PATCH v2 3/6] ASoC: codecs: lpass-wsa-macro: add dapm widgets and route Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla
2020-10-29 15:52   ` Pierre-Louis Bossart
2020-10-29 15:52     ` Pierre-Louis Bossart
2020-11-03 12:31     ` Srinivas Kandagatla
2020-11-03 12:31       ` Srinivas Kandagatla
2020-11-03 15:51       ` Pierre-Louis Bossart
2020-11-03 15:51         ` Pierre-Louis Bossart
2020-10-29 11:08 ` [PATCH v2 4/6] ASoC: qcom: dt-bindings: add bindings for lpass va macro codec Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla
2020-11-04 21:21   ` Rob Herring
2020-11-04 21:21     ` Rob Herring
2020-10-29 11:08 ` [PATCH v2 5/6] ASoC: codecs: lpass-va-macro: Add support to VA Macro Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla
2020-10-29 15:56   ` Pierre-Louis Bossart
2020-10-29 15:56     ` Pierre-Louis Bossart
2020-11-03 12:31     ` Srinivas Kandagatla
2020-11-03 12:31       ` Srinivas Kandagatla
2020-10-29 11:08 ` [PATCH v2 6/6] ASoC: codecs: lpass-va-macro: add dapm widgets and routes Srinivas Kandagatla
2020-10-29 11:08   ` Srinivas Kandagatla

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=0bce847c-6437-9d12-6d54-d9ee99c7e896@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.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.