Commit 982f4a41 authored by Dan Murphy's avatar Dan Murphy Committed by Mark Brown

ASoC: tlv320adcx140: Move device reset to before programming

Reset the device before programming the registers or all programming
will be lost as the device resets registers to default settings.
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200730142419.28205-2-dmurphy@ti.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 806a8afe
...@@ -838,6 +838,10 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -838,6 +838,10 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source; bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source;
ret = adcx140_reset(adcx140);
if (ret)
goto out;
pdm_count = device_property_count_u32(adcx140->dev, pdm_count = device_property_count_u32(adcx140->dev,
"ti,pdm-edge-select"); "ti,pdm-edge-select");
if (pdm_count <= ADCX140_NUM_PDM_EDGES && pdm_count > 0) { if (pdm_count <= ADCX140_NUM_PDM_EDGES && pdm_count > 0) {
...@@ -885,10 +889,6 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -885,10 +889,6 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
if (ret) if (ret)
goto out; goto out;
ret = adcx140_reset(adcx140);
if (ret)
goto out;
if (adcx140->supply_areg == NULL) if (adcx140->supply_areg == NULL)
sleep_cfg_val |= ADCX140_AREG_INTERNAL; sleep_cfg_val |= ADCX140_AREG_INTERNAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment