Re: [PATCH 3/6] ASoC: codecs: wcd938x: Check for enumeration before using TX device

Mark Brown
2023-04-20T18:24:08Z

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Thu, Apr 20, 2023 at 07:57:11PM +0200, Krzysztof Kozlowski wrote:
> On 20/04/2023 16:18, Pierre-Louis Bossart wrote:

> > the alternative is to move regmap to be cache-only in the probe and
> > remove the cache-only property when the device is enumerated.

> The driver wants already to use the regmap in RW just few lines below in
> wcd938x_set_micbias_data().

> I guess I could move this entire piece of code to other place...

The register map is fully writeable (modulo any volatile registers of
course) in cache only mode, it's just that hardware access is
suppressed. The driver needs to resync the cache when transitioning out
of cache only mode (often in a runtime PM resume or something), this
will ensure any pending changes make it to the hardware.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]