Skip to content

Commit

Permalink
ASoC: twl4030: Remove check defaults functionality
Browse files Browse the repository at this point in the history
No need to keep the check defaults functionality anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Jan 8, 2014
1 parent a8fc415 commit 7bfbdfe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion include/linux/i2c/twl.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ struct twl4030_codec_data {
unsigned int digimic_delay; /* in ms */
unsigned int ramp_delay_value;
unsigned int offset_cncl_path;
unsigned int check_defaults:1;
unsigned int reset_registers:1;
unsigned int hs_extmute:1;
int hs_extmute_gpio;
Expand Down
23 changes: 0 additions & 23 deletions sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,25 +268,6 @@ static void twl4030_codec_enable(struct snd_soc_codec *codec, int enable)
udelay(10);
}

static inline void twl4030_check_defaults(struct snd_soc_codec *codec)
{
int i, difference = 0;
u8 val;

dev_dbg(codec->dev, "Checking TWL audio default configuration\n");
for (i = 1; i <= TWL4030_REG_MISC_SET_2; i++) {
twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &val, i);
if (val != twl4030_reg[i]) {
difference++;
dev_dbg(codec->dev,
"Reg 0x%02x: chip: 0x%02x driver: 0x%02x\n",
i, val, twl4030_reg[i]);
}
}
dev_dbg(codec->dev, "Found %d non-matching registers. %s\n",
difference, difference ? "Not OK" : "OK");
}

static inline void twl4030_reset_registers(struct snd_soc_codec *codec)
{
int i;
Expand Down Expand Up @@ -378,10 +359,6 @@ static void twl4030_init_chip(struct snd_soc_codec *codec)
}
}

/* Check defaults, if instructed before anything else */
if (pdata && pdata->check_defaults)
twl4030_check_defaults(codec);

/* Reset registers, if no setup data or if instructed to do so */
if (!pdata || (pdata && pdata->reset_registers))
twl4030_reset_registers(codec);
Expand Down

0 comments on commit 7bfbdfe

Please sign in to comment.