Skip to content

Commit 982f4a4

Browse files
Dan Murphybroonie
authored andcommitted
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: Dan Murphy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 806a8af commit 982f4a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/tlv320adcx140.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,10 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
838838

839839
bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source;
840840

841+
ret = adcx140_reset(adcx140);
842+
if (ret)
843+
goto out;
844+
841845
pdm_count = device_property_count_u32(adcx140->dev,
842846
"ti,pdm-edge-select");
843847
if (pdm_count <= ADCX140_NUM_PDM_EDGES && pdm_count > 0) {
@@ -885,10 +889,6 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
885889
if (ret)
886890
goto out;
887891

888-
ret = adcx140_reset(adcx140);
889-
if (ret)
890-
goto out;
891-
892892
if (adcx140->supply_areg == NULL)
893893
sleep_cfg_val |= ADCX140_AREG_INTERNAL;
894894

0 commit comments

Comments
 (0)