aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/lm49453.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/lm49453.c')
-rw-r--r--sound/soc/codecs/lm49453.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 6b7fe5e54881..275b3f72f3f4 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -213,15 +213,13 @@ static const char *lm49453_adcl_mux_text[] = { "MIC1", "Aux_L" };
213 213
214static const char *lm49453_adcr_mux_text[] = { "MIC2", "Aux_R" }; 214static const char *lm49453_adcr_mux_text[] = { "MIC2", "Aux_R" };
215 215
216static const struct soc_enum lm49453_adcl_enum = 216static SOC_ENUM_SINGLE_DECL(lm49453_adcl_enum,
217 SOC_ENUM_SINGLE(LM49453_P0_ANALOG_MIXER_ADC_REG, 0, 217 LM49453_P0_ANALOG_MIXER_ADC_REG, 0,
218 ARRAY_SIZE(lm49453_adcl_mux_text), 218 lm49453_adcl_mux_text);
219 lm49453_adcl_mux_text);
220 219
221static const struct soc_enum lm49453_adcr_enum = 220static SOC_ENUM_SINGLE_DECL(lm49453_adcr_enum,
222 SOC_ENUM_SINGLE(LM49453_P0_ANALOG_MIXER_ADC_REG, 1, 221 LM49453_P0_ANALOG_MIXER_ADC_REG, 1,
223 ARRAY_SIZE(lm49453_adcr_mux_text), 222 lm49453_adcr_mux_text);
224 lm49453_adcr_mux_text);
225 223
226static const struct snd_kcontrol_new lm49453_adcl_mux_control = 224static const struct snd_kcontrol_new lm49453_adcl_mux_control =
227 SOC_DAPM_ENUM("ADC Left Mux", lm49453_adcl_enum); 225 SOC_DAPM_ENUM("ADC Left Mux", lm49453_adcl_enum);
@@ -1409,22 +1407,6 @@ static int lm49453_resume(struct snd_soc_codec *codec)
1409 return 0; 1407 return 0;
1410} 1408}
1411 1409
1412static int lm49453_probe(struct snd_soc_codec *codec)
1413{
1414 struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
1415 int ret = 0;
1416
1417 codec->control_data = lm49453->regmap;
1418
1419 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1420 if (ret < 0) {
1421 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1422 return ret;
1423 }
1424
1425 return 0;
1426}
1427
1428/* power down chip */ 1410/* power down chip */
1429static int lm49453_remove(struct snd_soc_codec *codec) 1411static int lm49453_remove(struct snd_soc_codec *codec)
1430{ 1412{
@@ -1433,7 +1415,6 @@ static int lm49453_remove(struct snd_soc_codec *codec)
1433} 1415}
1434 1416
1435static struct snd_soc_codec_driver soc_codec_dev_lm49453 = { 1417static struct snd_soc_codec_driver soc_codec_dev_lm49453 = {
1436 .probe = lm49453_probe,
1437 .remove = lm49453_remove, 1418 .remove = lm49453_remove,
1438 .suspend = lm49453_suspend, 1419 .suspend = lm49453_suspend,
1439 .resume = lm49453_resume, 1420 .resume = lm49453_resume,