ASoC: wm8994: Allow microphone identification callback to be overridden
[deliverable/linux.git] / sound / soc / codecs / wm8994.h
index d77e06f0a6751f7a1d4394b90324916b6085a34d..46a7bdb7d2550bf053712b83c0d54ef16e971ccf 100644 (file)
 #define WM8994_FLL1 1
 #define WM8994_FLL2 2
 
-#define WM8994_FLL_SRC_MCLK1  1
-#define WM8994_FLL_SRC_MCLK2  2
-#define WM8994_FLL_SRC_LRCLK  3
-#define WM8994_FLL_SRC_BCLK   4
+#define WM8994_FLL_SRC_MCLK1    1
+#define WM8994_FLL_SRC_MCLK2    2
+#define WM8994_FLL_SRC_LRCLK    3
+#define WM8994_FLL_SRC_BCLK     4
+#define WM8994_FLL_SRC_INTERNAL 5
 
 enum wm8994_vmid_mode {
        WM8994_VMID_NORMAL,
        WM8994_VMID_FORCE,
 };
 
-typedef void (*wm8958_micdet_cb)(u16 status, void *data);
+typedef void (*wm1811_micdet_cb)(void *data);
+typedef void (*wm1811_mic_id_cb)(void *data, u16 status);
 
 int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
                      int micbias);
 int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
-                     wm8958_micdet_cb cb, void *cb_data);
+                     wm1811_micdet_cb cb, void *det_cb_data,
+                     wm1811_mic_id_cb id_cb, void *id_cb_data);
 
 int wm8994_vmid_mode(struct snd_soc_codec *codec, enum wm8994_vmid_mode mode);
 
@@ -72,7 +75,6 @@ struct wm8994;
 struct wm8994_priv {
        struct wm_hubs_data hubs;
        struct wm8994 *wm8994;
-       struct snd_soc_codec *codec;
        int sysclk[2];
        int sysclk_rate[2];
        int mclk[2];
@@ -81,6 +83,7 @@ struct wm8994_priv {
        struct completion fll_locked[2];
        bool fll_locked_irq;
        bool fll_byp;
+       bool clk_has_run;
 
        int vmid_refcount;
        int active_refcount;
@@ -134,13 +137,15 @@ struct wm8994_priv {
        int btn_mask;
        bool jackdet;
        int jackdet_mode;
+       struct delayed_work jackdet_bootstrap;
 
-       wm8958_micdet_cb jack_cb;
-       void *jack_cb_data;
        int micdet_irq;
+       wm1811_micdet_cb micd_cb;
+       void *micd_cb_data;
+       wm1811_mic_id_cb mic_id_cb;
+       void *mic_id_cb_data;
 
        int revision;
-       struct wm8994_pdata *pdata;
 
        unsigned int aif1clk_enable:1;
        unsigned int aif2clk_enable:1;
This page took 0.026362 seconds and 5 git commands to generate.