Skip to contentSkip to conversation

ASoC: sgtl5000: Mark CHIP_ANA_POWER as volatile

PATCH In review Fabio Estevam 2 participants 2 messages May 7, 2013 – May 8, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: sgtl5000: Mark CHIP_ANA_POWER as volatile

Register CHIP_ANA_POWER (address: 0x0030) contains all of the power down controls for the analog blocks.

Mark it as a volatile register, so that sgtl5000 can be functional after a reset.

Without this patch the following error happens after a audio playback followed by a reset:

sgtl5000 0-000a: Device with ID register ffff is not a sgtl5000 sgtl5000 0-000a: ASoC: failed to probe CODEC -19 imx-sgtl5000 sound.12: ASoC: failed to instantiate card -19 imx-sgtl5000 sound.12: snd_soc_register_card failed (-19)

---
 sound/soc/codecs/sgtl5000.c |    1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/sgtl5000.c +1 -0
index 327b443..8b704ff 100644
@@ -965,6 +965,7 @@ static bool sgtl5000_volatile(struct device *dev, unsigned int reg)
 	switch (reg) {
 	case SGTL5000_CHIP_ID:
 	case SGTL5000_CHIP_ADCDAC_CTRL:
+	case SGTL5000_CHIP_ANA_POWER:
 	case SGTL5000_CHIP_ANA_STATUS:
 		return true;
 	}
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 5 lines · Fabio Estevam

Register CHIP_ANA_POWER (address: 0x0030) contains all of the power down controls for the analog blocks.

Mark it as a volatile register, so that sgtl5000 can be functional after a reset.

Is this register actually volatile - in what situations does the chip autonomously change its power state?

Quoted 2 lines

Without this patch the following error happens after a audio playback followed by a reset:

What is the mechanism by which this change fixes the error you quote?