|
@@ -1137,6 +1137,10 @@ static int soc_probe_codec(struct snd_soc_card *card,
|
|
|
|
|
|
codec->dapm.idle_bias_off = driver->idle_bias_off;
|
|
codec->dapm.idle_bias_off = driver->idle_bias_off;
|
|
|
|
|
|
|
|
+ /* Set the default I/O up try regmap */
|
|
|
|
+ if (dev_get_regmap(codec->dev, NULL))
|
|
|
|
+ snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
|
|
|
|
+
|
|
if (driver->probe) {
|
|
if (driver->probe) {
|
|
ret = driver->probe(codec);
|
|
ret = driver->probe(codec);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
@@ -1150,10 +1154,6 @@ static int soc_probe_codec(struct snd_soc_card *card,
|
|
codec->name);
|
|
codec->name);
|
|
}
|
|
}
|
|
|
|
|
|
- /* If the driver didn't set I/O up try regmap */
|
|
|
|
- if (!codec->write && dev_get_regmap(codec->dev, NULL))
|
|
|
|
- snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
|
|
|
|
-
|
|
|
|
if (driver->controls)
|
|
if (driver->controls)
|
|
snd_soc_add_codec_controls(codec, driver->controls,
|
|
snd_soc_add_codec_controls(codec, driver->controls,
|
|
driver->num_controls);
|
|
driver->num_controls);
|