aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-26 09:05:56 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-26 17:23:32 -0400
commitf97217f18e99235c374f5ce2cde07072e49b582f (patch)
tree518d74be4d2460068d82519d797439acb83c16ed /sound/soc/codecs/twl6040.c
parentc0fd9c9c420f0e980b8539c781494c11a82290ce (diff)
ASoC: twl6040: Read the TRIM values from the chip
Update the reg_cache with values from chip regarding to TRIM. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 91b98186d072..7226ae788f2d 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)
278 struct twl6040 *twl6040 = codec->control_data; 278 struct twl6040 *twl6040 = codec->control_data;
279 u8 val; 279 u8 val;
280 280
281 /* Update reg_cache: ASICREV, and TRIM values */
281 val = twl6040_get_revid(twl6040); 282 val = twl6040_get_revid(twl6040);
282 twl6040_write_reg_cache(codec, TWL6040_REG_ASICREV, val); 283 twl6040_write_reg_cache(codec, TWL6040_REG_ASICREV, val);
283 284
285 twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM1);
286 twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM2);
287 twl6040_read_reg_volatile(codec, TWL6040_REG_TRIM3);
288 twl6040_read_reg_volatile(codec, TWL6040_REG_HSOTRIM);
289 twl6040_read_reg_volatile(codec, TWL6040_REG_HFOTRIM);
290
284 /* Change chip defaults */ 291 /* Change chip defaults */
285 /* No imput selected for microphone amplifiers */ 292 /* No imput selected for microphone amplifiers */
286 twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18); 293 twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18);