diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-11-29 09:03:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-19 13:37:07 -0500 |
commit | 79ae5130381cb7d3e74c162123392ba6067c218e (patch) | |
tree | 98a3d037554e4c7b40f18527e41073280678434a | |
parent | 53509108f7372f786576d7d43f8f881cdf51d38a (diff) |
ASoC: twl6040: Remove register restore functionality
The MFD core takes care of the restore via standard regmap API, no need to
do this anymore here.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/twl6040.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index fb8c65bd6e5d..b07839b2d912 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -133,22 +133,6 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = { | |||
133 | 0x00, /* REG_STATUS 0x2E (ro) */ | 133 | 0x00, /* REG_STATUS 0x2E (ro) */ |
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* List of registers to be restored after power up */ | ||
137 | static const int twl6040_restore_list[] = { | ||
138 | TWL6040_REG_MICLCTL, | ||
139 | TWL6040_REG_MICRCTL, | ||
140 | TWL6040_REG_MICGAIN, | ||
141 | TWL6040_REG_LINEGAIN, | ||
142 | TWL6040_REG_HSLCTL, | ||
143 | TWL6040_REG_HSRCTL, | ||
144 | TWL6040_REG_HSGAIN, | ||
145 | TWL6040_REG_EARCTL, | ||
146 | TWL6040_REG_HFLCTL, | ||
147 | TWL6040_REG_HFLGAIN, | ||
148 | TWL6040_REG_HFRCTL, | ||
149 | TWL6040_REG_HFRGAIN, | ||
150 | }; | ||
151 | |||
152 | /* set of rates for each pll: low-power and high-performance */ | 136 | /* set of rates for each pll: low-power and high-performance */ |
153 | static unsigned int lp_rates[] = { | 137 | static unsigned int lp_rates[] = { |
154 | 8000, | 138 | 8000, |
@@ -335,17 +319,6 @@ static void twl6040_init_chip(struct snd_soc_codec *codec) | |||
335 | twl6040_write_reg_cache(codec, TWL6040_REG_LINEGAIN, 0); | 319 | twl6040_write_reg_cache(codec, TWL6040_REG_LINEGAIN, 0); |
336 | } | 320 | } |
337 | 321 | ||
338 | static void twl6040_restore_regs(struct snd_soc_codec *codec) | ||
339 | { | ||
340 | u8 *cache = codec->reg_cache; | ||
341 | int reg, i; | ||
342 | |||
343 | for (i = 0; i < ARRAY_SIZE(twl6040_restore_list); i++) { | ||
344 | reg = twl6040_restore_list[i]; | ||
345 | twl6040_write(codec, reg, cache[reg]); | ||
346 | } | ||
347 | } | ||
348 | |||
349 | /* set headset dac and driver power mode */ | 322 | /* set headset dac and driver power mode */ |
350 | static int headset_power_mode(struct snd_soc_codec *codec, int high_perf) | 323 | static int headset_power_mode(struct snd_soc_codec *codec, int high_perf) |
351 | { | 324 | { |
@@ -978,8 +951,6 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, | |||
978 | 951 | ||
979 | priv->codec_powered = 1; | 952 | priv->codec_powered = 1; |
980 | 953 | ||
981 | twl6040_restore_regs(codec); | ||
982 | |||
983 | /* Set external boost GPO */ | 954 | /* Set external boost GPO */ |
984 | twl6040_write(codec, TWL6040_REG_GPOCTL, 0x02); | 955 | twl6040_write(codec, TWL6040_REG_GPOCTL, 0x02); |
985 | break; | 956 | break; |