]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ASoC: sgtl5000: Fix driver probe after reset
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 10 May 2013 00:15:47 +0000 (21:15 -0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 12 May 2013 16:50:02 +0000 (20:50 +0400)
commitaf8ee11209e749c75eabf32b2a4ca631f396acf8
tree488b9ca686b984d92611e18b50c724f177679723
parentb871f1ad3c8a1ac2fb862f9261f14a67dc2c7b7d
ASoC: sgtl5000: Fix driver probe after reset

After a 'reboot' command in Linux or after pressing the system's reset button
the sgtl5000 driver fails to probe:

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)

sgtl5000 codec does not have a reset line, nor a reset command in software, so
after a system reset the codec does not contain the default register values
from sgtl5000_reg_defaults[] anymore, as these are only valid after a
power-on-reset cycle.

Fix this issue by explicitly reading all the reset register values from
sgtl5000_reg_defaults[] and writing them back into sgtl5000 to ensure a sane
state.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/sgtl5000.c