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

ASoC: codecs: ES8326: change members of private

Merge series from Zhang Yi <zhangyi@everest-semi.com>:

We found that using 0x45 as the default value for interrupt-clk
would cause a headset detection error.So we took 0x00 as the default
value for interrupt-clk and passed the test.
We removed mic1-src and mic2-src, which were not used.
parents 5d51a794 e87eecdf
...@@ -38,6 +38,7 @@ properties: ...@@ -38,6 +38,7 @@ properties:
default: 0x0f default: 0x0f
everest,mic1-src: everest,mic1-src:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint8 $ref: /schemas/types.yaml#/definitions/uint8
description: description:
the value of reg 2A when headset plugged. the value of reg 2A when headset plugged.
...@@ -46,6 +47,7 @@ properties: ...@@ -46,6 +47,7 @@ properties:
default: 0x22 default: 0x22
everest,mic2-src: everest,mic2-src:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint8 $ref: /schemas/types.yaml#/definitions/uint8
description: description:
the value of reg 2A when headset unplugged. the value of reg 2A when headset unplugged.
...@@ -87,7 +89,7 @@ properties: ...@@ -87,7 +89,7 @@ properties:
0 means the chip detect jack type again after button released. 0 means the chip detect jack type again after button released.
minimum: 0 minimum: 0
maximum: 0x7f maximum: 0x7f
default: 0x45 default: 0x00
required: required:
- compatible - compatible
...@@ -107,10 +109,8 @@ examples: ...@@ -107,10 +109,8 @@ examples:
clocks = <&clks 10>; clocks = <&clks 10>;
clock-names = "mclk"; clock-names = "mclk";
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
everest,mic1-src = [22];
everest,mic2-src = [44];
everest,jack-pol = [0e]; everest,jack-pol = [0e];
everest,interrupt-src = [08]; everest,interrupt-src = [08];
everest,interrupt-clk = [45]; everest,interrupt-clk = [00];
}; };
}; };
...@@ -31,8 +31,6 @@ struct es8326_priv { ...@@ -31,8 +31,6 @@ struct es8326_priv {
* while enabling or disabling or during an irq. * while enabling or disabling or during an irq.
*/ */
struct mutex lock; struct mutex lock;
u8 mic1_src;
u8 mic2_src;
u8 jack_pol; u8 jack_pol;
u8 interrupt_src; u8 interrupt_src;
u8 interrupt_clk; u8 interrupt_clk;
...@@ -1092,20 +1090,6 @@ static int es8326_probe(struct snd_soc_component *component) ...@@ -1092,20 +1090,6 @@ static int es8326_probe(struct snd_soc_component *component)
es8326->jd_inverted = device_property_read_bool(component->dev, es8326->jd_inverted = device_property_read_bool(component->dev,
"everest,jack-detect-inverted"); "everest,jack-detect-inverted");
ret = device_property_read_u8(component->dev, "everest,mic1-src", &es8326->mic1_src);
if (ret != 0) {
dev_dbg(component->dev, "mic1-src return %d", ret);
es8326->mic1_src = ES8326_ADC_AMIC;
}
dev_dbg(component->dev, "mic1-src %x", es8326->mic1_src);
ret = device_property_read_u8(component->dev, "everest,mic2-src", &es8326->mic2_src);
if (ret != 0) {
dev_dbg(component->dev, "mic2-src return %d", ret);
es8326->mic2_src = ES8326_ADC_DMIC;
}
dev_dbg(component->dev, "mic2-src %x", es8326->mic2_src);
ret = device_property_read_u8(component->dev, "everest,jack-pol", &es8326->jack_pol); ret = device_property_read_u8(component->dev, "everest,jack-pol", &es8326->jack_pol);
if (ret != 0) { if (ret != 0) {
dev_dbg(component->dev, "jack-pol return %d", ret); dev_dbg(component->dev, "jack-pol return %d", ret);
...@@ -1125,7 +1109,7 @@ static int es8326_probe(struct snd_soc_component *component) ...@@ -1125,7 +1109,7 @@ static int es8326_probe(struct snd_soc_component *component)
&es8326->interrupt_clk); &es8326->interrupt_clk);
if (ret != 0) { if (ret != 0) {
dev_dbg(component->dev, "interrupt-clk return %d", ret); dev_dbg(component->dev, "interrupt-clk return %d", ret);
es8326->interrupt_clk = 0x45; es8326->interrupt_clk = 0x00;
} }
dev_dbg(component->dev, "interrupt-clk %x", es8326->interrupt_clk); dev_dbg(component->dev, "interrupt-clk %x", es8326->interrupt_clk);
......
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