]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: twl6040: Read the TRIM values from the chip
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 26 Sep 2011 13:05:56 +0000 (16:05 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 26 Sep 2011 21:23:32 +0000 (22:23 +0100)
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>
sound/soc/codecs/twl6040.c

index 91b98186d072de830454647dbfd8acdb9afddf47..7226ae788f2d1e4e5e68e564a495916f7c086476 100644 (file)
@@ -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);