Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: twl4030: Remove reset registers functionality

The register states now tracked by the regmap implementation in the core which
makes the reset registers functionality 'redundant' since we know the state
of the registers now all the time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Peter Ujfalusi and committed by
Mark Brown
0dc41562 7bfbdfea

-18
-1
include/linux/i2c/twl.h
··· 670 670 unsigned int digimic_delay; /* in ms */ 671 671 unsigned int ramp_delay_value; 672 672 unsigned int offset_cncl_path; 673 - unsigned int reset_registers:1; 674 673 unsigned int hs_extmute:1; 675 674 int hs_extmute_gpio; 676 675 };
-17
sound/soc/codecs/twl4030.c
··· 268 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 271 static void twl4030_setup_pdata_of(struct twl4030_codec_data *pdata, 283 272 struct device_node *node) 284 273 { ··· 347 358 TWL4030_PMBR1_REG); 348 359 } 349 360 } 350 - 351 - /* Reset registers, if no setup data or if instructed to do so */ 352 - if (!pdata || (pdata && pdata->reset_registers)) 353 - twl4030_reset_registers(codec); 354 361 355 362 /* Refresh APLL_CTL register from HW */ 356 363 twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, ··· 2278 2293 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); 2279 2294 struct twl4030_codec_data *pdata = twl4030->pdata; 2280 2295 2281 - /* Reset registers to their chip default before leaving */ 2282 - twl4030_reset_registers(codec); 2283 2296 twl4030_set_bias_level(codec, SND_SOC_BIAS_OFF); 2284 2297 2285 2298 if (pdata && pdata->hs_extmute && gpio_is_valid(pdata->hs_extmute_gpio))