11 Dec
2010
11 Dec
'10
11:18 a.m.
On Fri, Dec 10, 2010 at 08:45:17PM -0600, Olaya, Margarita wrote:
From: Jorge Eduardo Candelaria jorge.candelaria@ti.com
This patch adds support for reporting twl6040 headset and handset jack events.
The machine driver retrieves and report the status through twl6040_hs_jack_detect.
A workq is used to debounce of the irq.
Acked-by: Mark Brown broonie@opensource.wolfsonmicro.com
but...
+void twl6040_hs_jack_detect(struct snd_soc_codec *codec,
struct snd_soc_jack *jack, int report)
+{
- struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
- struct twl6040_jack_data *hs_jack = &priv->hs_jack;
- hs_jack->jack = jack;
- hs_jack->report = report;
- twl6040_hs_jack_report(codec, hs_jack->jack, hs_jack->report);
+} +EXPORT_SYMBOL_GPL(twl6040_hs_jack_detect);
...note that this doesn't actually enable and disable jack detection so you might find some system integration issues if the jack detection misbehaves when not wired up as expected on the board.