diff options
Diffstat (limited to 'sound/soc/codecs/wm8955.c')
-rw-r--r-- | sound/soc/codecs/wm8955.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 82c8ba975720..fecd4e4f4c57 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
@@ -416,22 +416,21 @@ static const char *bass_mode_text[] = { | |||
416 | "Linear", "Adaptive", | 416 | "Linear", "Adaptive", |
417 | }; | 417 | }; |
418 | 418 | ||
419 | static const struct soc_enum bass_mode = | 419 | static SOC_ENUM_SINGLE_DECL(bass_mode, WM8955_BASS_CONTROL, 7, bass_mode_text); |
420 | SOC_ENUM_SINGLE(WM8955_BASS_CONTROL, 7, 2, bass_mode_text); | ||
421 | 420 | ||
422 | static const char *bass_cutoff_text[] = { | 421 | static const char *bass_cutoff_text[] = { |
423 | "Low", "High" | 422 | "Low", "High" |
424 | }; | 423 | }; |
425 | 424 | ||
426 | static const struct soc_enum bass_cutoff = | 425 | static SOC_ENUM_SINGLE_DECL(bass_cutoff, WM8955_BASS_CONTROL, 6, |
427 | SOC_ENUM_SINGLE(WM8955_BASS_CONTROL, 6, 2, bass_cutoff_text); | 426 | bass_cutoff_text); |
428 | 427 | ||
429 | static const char *treble_cutoff_text[] = { | 428 | static const char *treble_cutoff_text[] = { |
430 | "High", "Low" | 429 | "High", "Low" |
431 | }; | 430 | }; |
432 | 431 | ||
433 | static const struct soc_enum treble_cutoff = | 432 | static SOC_ENUM_SINGLE_DECL(treble_cutoff, WM8955_TREBLE_CONTROL, 2, |
434 | SOC_ENUM_SINGLE(WM8955_TREBLE_CONTROL, 6, 2, treble_cutoff_text); | 433 | treble_cutoff_text); |
435 | 434 | ||
436 | static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1); | 435 | static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1); |
437 | static const DECLARE_TLV_DB_SCALE(atten_tlv, -600, 600, 0); | 436 | static const DECLARE_TLV_DB_SCALE(atten_tlv, -600, 600, 0); |
@@ -896,14 +895,6 @@ static int wm8955_probe(struct snd_soc_codec *codec) | |||
896 | struct wm8955_pdata *pdata = dev_get_platdata(codec->dev); | 895 | struct wm8955_pdata *pdata = dev_get_platdata(codec->dev); |
897 | int ret, i; | 896 | int ret, i; |
898 | 897 | ||
899 | codec->control_data = wm8955->regmap; | ||
900 | |||
901 | ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP); | ||
902 | if (ret != 0) { | ||
903 | dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); | ||
904 | return ret; | ||
905 | } | ||
906 | |||
907 | for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++) | 898 | for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++) |
908 | wm8955->supplies[i].supply = wm8955_supply_names[i]; | 899 | wm8955->supplies[i].supply = wm8955_supply_names[i]; |
909 | 900 | ||