Skip to contentSkip to conversation

ASoC: Add initialization for wm8997 component

PATCH In review Wentao Liang 2 participants 2 messages Mar 17, 2025 – Mar 18, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Add initialization for wm8997 component

In wm8997_component_probe(), wm8997 should be initialized by arizona_init_gpio(). A proper implementation can be found in 'wm8998_component_probe()' where the wm8998 component is initialized with arizona_init_gpio().

---
 sound/soc/codecs/wm8997.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/wm8997.c +2 -0
index 5389c363b14e..ef8e09cc7211 100644
@@ -1066,6 +1066,8 @@ static int wm8997_component_probe(struct snd_soc_component *component)
 	if (ret < 0)
 		return ret;
 
+	arizona_init_gpio(component);
+
 	snd_soc_component_disable_pin(component, "HAPTICS");
 
 	priv->core.arizona->dapm = dapm;
Signature · 1 line
2.42.0.windows.2
#1 lore raw
Quoted 15 lines · Wentao Liang

In wm8997_component_probe(), wm8997 should be initialized by arizona_init_gpio(). A proper implementation can be found in 'wm8998_component_probe()' where the wm8998 component is initialized with arizona_init_gpio().

---
 sound/soc/codecs/wm8997.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/wm8997.c +0 -0
index 5389c363b14e..ef8e09cc7211 100644

sound/soc/codecs/wm8997.c static int wm8997_component_probe(struct snd_soc_component *component) · line 1070

Quoted 5 lines
sound/soc/codecs/wm8997.c +2 -0
@@ -1066,6 +1066,8 @@ static int wm8997_component_probe(struct snd_soc_component *component)
 	if (ret < 0)
 		return ret;
 
+	arizona_init_gpio(component);
+

This is not a missing initialisation, arizona_init_gpios hooks up the signal detect feature. I am not certain it is worth adding the signal detect feature to wm8997 at this point given I am not even sure it shipped any units. If you do actually have a reason for doing so, this is not sufficient to enable the feature. You need to also add the Signal Detect widgets and routes.

Thanks,
Charles