On 29/01/2021 15:08, Mark Brown wrote:
On Fri, Jan 29, 2021 at 01:32:38PM +0000, Srinivas Kandagatla wrote:
On 28/01/2021 16:07, Mark Brown wrote:
if (rx->rx_mclk_users == 0) {
regcache_mark_dirty(regmap);
regcache_sync(regmap);
I'd expect this to be joined up with whatever caused the register state to become invalid, this looks like it's inviting bugs. This also seems to have only one caller...
Few lines below we are moving the digital clock from OFF to ON which will change the state of registers. There are two callers, one from DAPM RX CLK widget and other from soundwire clock gate! We will potentially enter this path when we are resuming from clk pause state!
You're not syncing with whatever invalidated the register state and caused it to need a resync, or if you think whatever invalidated the register state is in this function you're resyncing before taking any other action which means there's some kind of ordering issue.
I see your point! it should be synced after the clock is switched from OFF to ON!
Will fix this in next spin!
--srini