diff options
| -rw-r--r-- | include/linux/i2c/twl.h | 1 | ||||
| -rw-r--r-- | sound/soc/codecs/twl4030.c | 17 |
2 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 2937a9472b94..ade1c06d4ceb 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -670,7 +670,6 @@ struct twl4030_codec_data { | |||
| 670 | unsigned int digimic_delay; /* in ms */ | 670 | unsigned int digimic_delay; /* in ms */ |
| 671 | unsigned int ramp_delay_value; | 671 | unsigned int ramp_delay_value; |
| 672 | unsigned int offset_cncl_path; | 672 | unsigned int offset_cncl_path; |
| 673 | unsigned int reset_registers:1; | ||
| 674 | unsigned int hs_extmute:1; | 673 | unsigned int hs_extmute:1; |
| 675 | int hs_extmute_gpio; | 674 | int hs_extmute_gpio; |
| 676 | }; | 675 | }; |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 7b732ab70d2c..ab2f22299db2 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
| @@ -268,17 +268,6 @@ static void twl4030_codec_enable(struct snd_soc_codec *codec, int enable) | |||
| 268 | udelay(10); | 268 | udelay(10); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | static inline void twl4030_reset_registers(struct snd_soc_codec *codec) | ||
| 272 | { | ||
| 273 | int i; | ||
| 274 | |||
| 275 | /* set all audio section registers to reasonable defaults */ | ||
| 276 | for (i = TWL4030_REG_OPTION; i <= TWL4030_REG_MISC_SET_2; i++) | ||
| 277 | if (i != TWL4030_REG_APLL_CTL) | ||
| 278 | twl4030_write(codec, i, twl4030_reg[i]); | ||
| 279 | |||
| 280 | } | ||
| 281 | |||
| 282 | static void twl4030_setup_pdata_of(struct twl4030_codec_data *pdata, | 271 | static void twl4030_setup_pdata_of(struct twl4030_codec_data *pdata, |
| 283 | struct device_node *node) | 272 | struct device_node *node) |
| 284 | { | 273 | { |
| @@ -359,10 +348,6 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) | |||
| 359 | } | 348 | } |
| 360 | } | 349 | } |
| 361 | 350 | ||
| 362 | /* Reset registers, if no setup data or if instructed to do so */ | ||
| 363 | if (!pdata || (pdata && pdata->reset_registers)) | ||
| 364 | twl4030_reset_registers(codec); | ||
| 365 | |||
| 366 | /* Refresh APLL_CTL register from HW */ | 351 | /* Refresh APLL_CTL register from HW */ |
| 367 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, | 352 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, |
| 368 | TWL4030_REG_APLL_CTL); | 353 | TWL4030_REG_APLL_CTL); |
| @@ -2293,8 +2278,6 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec) | |||
| 2293 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | 2278 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
| 2294 | struct twl4030_codec_data *pdata = twl4030->pdata; | 2279 | struct twl4030_codec_data *pdata = twl4030->pdata; |
| 2295 | 2280 | ||
| 2296 | /* Reset registers to their chip default before leaving */ | ||
| 2297 | twl4030_reset_registers(codec); | ||
| 2298 | twl4030_set_bias_level(codec, SND_SOC_BIAS_OFF); | 2281 | twl4030_set_bias_level(codec, SND_SOC_BIAS_OFF); |
| 2299 | 2282 | ||
| 2300 | if (pdata && pdata->hs_extmute && gpio_is_valid(pdata->hs_extmute_gpio)) | 2283 | if (pdata && pdata->hs_extmute && gpio_is_valid(pdata->hs_extmute_gpio)) |
