From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
matt@genesi-usa.com, alsa-devel@alsa-project.org,
eric.nelson@boundarydevices.com, troy.kisky@boundarydevices.com
Subject: [PATCH] ASoC: sgtl5000: Fix driver probe after reset
Date: Wed, 8 May 2013 14:04:06 -0300 [thread overview]
Message-ID: <1368032653-19489-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
sgtl5000 codec does not have a reset line, nor a reset command in software.
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)
As the sgtl5000 codec did not go through a real reset, we cannot rely on the
reg_defaults array, since these are only valid after a clean power-on reset.
To fix this issue, use 'reg_defaults_raw' which tells the regcache driver
to actually read the codec registers and then fill the cache.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/codecs/sgtl5000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 327b443..c59fae8 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1470,8 +1470,8 @@ static const struct regmap_config sgtl5000_regmap = {
.readable_reg = sgtl5000_readable,
.cache_type = REGCACHE_RBTREE,
- .reg_defaults = sgtl5000_reg_defaults,
- .num_reg_defaults = ARRAY_SIZE(sgtl5000_reg_defaults),
+ .reg_defaults_raw = sgtl5000_reg_defaults,
+ .num_reg_defaults_raw = ARRAY_SIZE(sgtl5000_reg_defaults),
};
static int sgtl5000_i2c_probe(struct i2c_client *client,
--
1.7.9.5
next reply other threads:[~2013-05-08 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 17:04 Fabio Estevam [this message]
2013-05-08 20:12 ` [PATCH] ASoC: sgtl5000: Fix driver probe after reset Lars-Peter Clausen
2013-05-09 9:30 ` Mark Brown
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=1368032653-19489-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=eric.nelson@boundarydevices.com \
--cc=fabio.estevam@freescale.com \
--cc=matt@genesi-usa.com \
--cc=troy.kisky@boundarydevices.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox