diff options
author | Mark Brown <broonie@kernel.org> | 2020-05-14 20:37:31 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-14 20:37:31 +0300 |
commit | 5ae5eb48ca046adffbdff56a2f297d0896b83186 (patch) | |
tree | 9cf1c12f9e2ce963366a8fc812367fde1b9f5cfc /sound/soc/codecs/tlv320adcx140.c | |
parent | 79fc48e41e39d7a98c5f8ae37f613d7ff9953c86 (diff) | |
parent | 0e36f32f6b6c4c86a6bf3d6f0940831691b0a3b0 (diff) | |
download | linux-5ae5eb48ca046adffbdff56a2f297d0896b83186.tar.xz |
Merge branch 'for-5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.8
Diffstat (limited to 'sound/soc/codecs/tlv320adcx140.c')
-rw-r--r-- | sound/soc/codecs/tlv320adcx140.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index 140a5802a9a9..472d759ba8a3 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -758,15 +758,16 @@ static int adcx140_codec_probe(struct snd_soc_component *component) { struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component); int sleep_cfg_val = ADCX140_WAKE_DEV; - u8 bias_source; - u8 vref_source; + u32 bias_source; + u32 vref_source; + u8 bias_cfg; int pdm_count; u32 pdm_edges[ADCX140_NUM_PDM_EDGES]; u32 pdm_edge_val = 0; int i; int ret; - ret = device_property_read_u8(adcx140->dev, "ti,mic-bias-source", + ret = device_property_read_u32(adcx140->dev, "ti,mic-bias-source", &bias_source); if (ret) bias_source = ADCX140_MIC_BIAS_VAL_VREF; @@ -777,7 +778,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) return -EINVAL; } - ret = device_property_read_u8(adcx140->dev, "ti,vref-source", + ret = device_property_read_u32(adcx140->dev, "ti,vref-source", &vref_source); if (ret) vref_source = ADCX140_MIC_BIAS_VREF_275V; @@ -788,7 +789,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) return -EINVAL; } - bias_source |= vref_source; + bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source; pdm_count = device_property_count_u32(adcx140->dev, "ti,pdm-edge-select"); @@ -826,7 +827,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG, ADCX140_MIC_BIAS_VAL_MSK | - ADCX140_MIC_BIAS_VREF_MSK, bias_source); + ADCX140_MIC_BIAS_VREF_MSK, bias_cfg); if (ret) dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret); out: |