summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlexey Firago <a.firago@yadro.com>2023-02-04 22:51:06 +0300
committerMark Brown <broonie@kernel.org>2023-02-06 16:12:34 +0300
commitfe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9 (patch)
tree708dbc2e134f5cc0de9cd2e6d9c0be4fb627581c /sound
parent2e7c6652f9b86c01cbd4e988057a746a3a461969 (diff)
downloadlinux-fe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9.tar.xz
ASoC: codecs: es8326: Fix DTS properties reading
Seems like properties parsing and reading was copy-pasted, so "everest,interrupt-src" and "everest,interrupt-clk" are saved into the es8326->jack_pol variable. This might lead to wrong settings being saved into the reg 57 (ES8326_HP_DET). Fix this by using proper variables while reading properties. Signed-off-by: Alexey Firago <a.firago@yadro.com> Reviewed-by: Yang Yingliang <yangyingliang@huawei.com Link: https://lore.kernel.org/r/20230204195106.46539-1-a.firago@yadro.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rwxr-xr-xsound/soc/codecs/es8326.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 9ddf6a35e91c..28a0565c2a95 100755
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -729,14 +729,16 @@ static int es8326_probe(struct snd_soc_component *component)
}
dev_dbg(component->dev, "jack-pol %x", es8326->jack_pol);
- ret = device_property_read_u8(component->dev, "everest,interrupt-src", &es8326->jack_pol);
+ ret = device_property_read_u8(component->dev, "everest,interrupt-src",
+ &es8326->interrupt_src);
if (ret != 0) {
dev_dbg(component->dev, "interrupt-src return %d", ret);
es8326->interrupt_src = ES8326_HP_DET_SRC_PIN9;
}
dev_dbg(component->dev, "interrupt-src %x", es8326->interrupt_src);
- ret = device_property_read_u8(component->dev, "everest,interrupt-clk", &es8326->jack_pol);
+ ret = device_property_read_u8(component->dev, "everest,interrupt-clk",
+ &es8326->interrupt_clk);
if (ret != 0) {
dev_dbg(component->dev, "interrupt-clk return %d", ret);
es8326->interrupt_clk = 0x45;