Commit 5ae5eb48 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-5.7' of...

Merge branch 'for-5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.8
parents 79fc48e4 0e36f32f
...@@ -758,15 +758,16 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -758,15 +758,16 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
{ {
struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component); struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component);
int sleep_cfg_val = ADCX140_WAKE_DEV; int sleep_cfg_val = ADCX140_WAKE_DEV;
u8 bias_source; u32 bias_source;
u8 vref_source; u32 vref_source;
u8 bias_cfg;
int pdm_count; int pdm_count;
u32 pdm_edges[ADCX140_NUM_PDM_EDGES]; u32 pdm_edges[ADCX140_NUM_PDM_EDGES];
u32 pdm_edge_val = 0; u32 pdm_edge_val = 0;
int i; int i;
int ret; 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); &bias_source);
if (ret) if (ret)
bias_source = ADCX140_MIC_BIAS_VAL_VREF; bias_source = ADCX140_MIC_BIAS_VAL_VREF;
...@@ -777,7 +778,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -777,7 +778,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
return -EINVAL; return -EINVAL;
} }
ret = device_property_read_u8(adcx140->dev, "ti,vref-source", ret = device_property_read_u32(adcx140->dev, "ti,vref-source",
&vref_source); &vref_source);
if (ret) if (ret)
vref_source = ADCX140_MIC_BIAS_VREF_275V; vref_source = ADCX140_MIC_BIAS_VREF_275V;
...@@ -788,7 +789,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -788,7 +789,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
return -EINVAL; return -EINVAL;
} }
bias_source |= vref_source; bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source;
pdm_count = device_property_count_u32(adcx140->dev, pdm_count = device_property_count_u32(adcx140->dev,
"ti,pdm-edge-select"); "ti,pdm-edge-select");
...@@ -826,7 +827,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component) ...@@ -826,7 +827,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG, ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG,
ADCX140_MIC_BIAS_VAL_MSK | ADCX140_MIC_BIAS_VAL_MSK |
ADCX140_MIC_BIAS_VREF_MSK, bias_source); ADCX140_MIC_BIAS_VREF_MSK, bias_cfg);
if (ret) if (ret)
dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret); dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret);
out: out:
......
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
#define ADCX140_MIC_BIAS_VAL_VREF_1096 1 #define ADCX140_MIC_BIAS_VAL_VREF_1096 1
#define ADCX140_MIC_BIAS_VAL_AVDD 6 #define ADCX140_MIC_BIAS_VAL_AVDD 6
#define ADCX140_MIC_BIAS_VAL_MSK GENMASK(6, 4) #define ADCX140_MIC_BIAS_VAL_MSK GENMASK(6, 4)
#define ADCX140_MIC_BIAS_SHIFT 4
#define ADCX140_MIC_BIAS_VREF_275V 0 #define ADCX140_MIC_BIAS_VREF_275V 0
#define ADCX140_MIC_BIAS_VREF_25V 1 #define ADCX140_MIC_BIAS_VREF_25V 1
......
...@@ -3798,7 +3798,7 @@ static int wm8962_runtime_resume(struct device *dev) ...@@ -3798,7 +3798,7 @@ static int wm8962_runtime_resume(struct device *dev)
/* SYSCLK defaults to on; make sure it is off so we can safely /* SYSCLK defaults to on; make sure it is off so we can safely
* write to registers if the device is declocked. * write to registers if the device is declocked.
*/ */
regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2, regmap_write_bits(wm8962->regmap, WM8962_CLOCKING2,
WM8962_SYSCLK_ENA, 0); WM8962_SYSCLK_ENA, 0);
/* Ensure we have soft control over all registers */ /* Ensure we have soft control over all registers */
......
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