On Wed, Feb 04, 2015 at 09:34:03PM +0800, Jie Yang wrote:
+int rt286_disable_jack_detection(struct snd_soc_codec *codec) +{
- struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
- disable_irq(rt286->i2c->irq);
- snd_soc_dapm_disable_pin(&rt286->codec->dapm, "LDO1");
- snd_soc_dapm_sync(&rt286->codec->dapm);
- return 0;
+} +EXPORT_SYMBOL_GPL(rt286_disable_jack_detection);
So, now I look at this again I'm wondering why this isn't writing to any registers - looking at the code we run on probe there's a register write if we're passed an interrupt which looks awfully like we're enabling jack detect. Probably we wouldn't need to do the rather odd disabling of the IRQ if we did that, but perhaps it's required.
I think there's actually problems with the existing jack detection code in the driver, I'd expect that the initial enabling of jack detect would be done when the machine driver says it wants jack detect by passing in the jack to report for.