From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, Misael Lopez Cruz <misael.lopez@ti.com>
Subject: [PATCH resend 1/4] ASoC: twl6040: Read the TRIM values from the chip
Date: Mon, 26 Sep 2011 16:05:56 +0300 [thread overview]
Message-ID: <1317042359-27127-2-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1317042359-27127-1-git-send-email-peter.ujfalusi@ti.com>
Update the reg_cache with values from chip regarding to TRIM.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
sound/soc/codecs/twl6040.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index dabf37b..26c06ff 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -278,9 +278,16 @@ static void twl6040_init_chip(struct snd_soc_codec *codec)
struct twl6040 *twl6040 = codec->control_data;
u8 val;
+ /* Update reg_cache: ASICREV, and TRIM values */
val = twl6040_get_revid(twl6040);
twl6040_write_reg_cache(codec, TWL6040_REG_ASICREV, val);
+ twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM1);
+ twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM2);
+ twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM3);
+ twl6040_read_reg_volatile(codec, TWL6040_REG_HSOTRIM);
+ twl6040_read_reg_volatile(codec, TWL6040_REG_HFOTRIM);
+
/* Change chip defaults */
/* No imput selected for microphone amplifiers */
twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18);
--
1.7.6.1
next prev parent reply other threads:[~2011-09-26 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 13:05 [PATCH resend 0/4] ASoC: omap-mcpdm/twl6040: Offset cancellation Peter Ujfalusi
2011-09-26 13:05 ` Peter Ujfalusi [this message]
2011-09-26 13:05 ` [PATCH resend 2/4] ASoC: twl6040: Function to fetch the TRIM values Peter Ujfalusi
2011-09-26 13:05 ` [PATCH resend 3/4] ASoC: omap-mcpdm: API to configure offset cancellation Peter Ujfalusi
2011-09-26 13:05 ` [PATCH resend 4/4] ASoC: sdp4430: Configure McPDM " Peter Ujfalusi
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=1317042359-27127-2-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=misael.lopez@ti.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;
as well as URLs for NNTP newsgroup(s).