diff options
Diffstat (limited to 'include/sound/wm8903.h')
-rw-r--r-- | include/sound/wm8903.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index b4a0db2307ef..cf7ccb76a8de 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h | |||
@@ -17,13 +17,9 @@ | |||
17 | /* | 17 | /* |
18 | * R6 (0x06) - Mic Bias Control 0 | 18 | * R6 (0x06) - Mic Bias Control 0 |
19 | */ | 19 | */ |
20 | #define WM8903_MICDET_HYST_ENA 0x0080 /* MICDET_HYST_ENA */ | 20 | #define WM8903_MICDET_THR_MASK 0x0030 /* MICDET_THR - [5:4] */ |
21 | #define WM8903_MICDET_HYST_ENA_MASK 0x0080 /* MICDET_HYST_ENA */ | 21 | #define WM8903_MICDET_THR_SHIFT 4 /* MICDET_THR - [5:4] */ |
22 | #define WM8903_MICDET_HYST_ENA_SHIFT 7 /* MICDET_HYST_ENA */ | 22 | #define WM8903_MICDET_THR_WIDTH 2 /* MICDET_THR - [5:4] */ |
23 | #define WM8903_MICDET_HYST_ENA_WIDTH 1 /* MICDET_HYST_ENA */ | ||
24 | #define WM8903_MICDET_THR_MASK 0x0070 /* MICDET_THR - [6:4] */ | ||
25 | #define WM8903_MICDET_THR_SHIFT 4 /* MICDET_THR - [6:4] */ | ||
26 | #define WM8903_MICDET_THR_WIDTH 3 /* MICDET_THR - [6:4] */ | ||
27 | #define WM8903_MICSHORT_THR_MASK 0x000C /* MICSHORT_THR - [3:2] */ | 23 | #define WM8903_MICSHORT_THR_MASK 0x000C /* MICSHORT_THR - [3:2] */ |
28 | #define WM8903_MICSHORT_THR_SHIFT 2 /* MICSHORT_THR - [3:2] */ | 24 | #define WM8903_MICSHORT_THR_SHIFT 2 /* MICSHORT_THR - [3:2] */ |
29 | #define WM8903_MICSHORT_THR_WIDTH 2 /* MICSHORT_THR - [3:2] */ | 25 | #define WM8903_MICSHORT_THR_WIDTH 2 /* MICSHORT_THR - [3:2] */ |
@@ -37,6 +33,21 @@ | |||
37 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ | 33 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ |
38 | 34 | ||
39 | /* | 35 | /* |
36 | * WM8903_GPn_FN values | ||
37 | * | ||
38 | * See datasheets for list of valid values per pin | ||
39 | */ | ||
40 | #define WM8903_GPn_FN_GPIO_OUTPUT 0 | ||
41 | #define WM8903_GPn_FN_BCLK 1 | ||
42 | #define WM8903_GPn_FN_IRQ_OUTPT 2 | ||
43 | #define WM8903_GPn_FN_GPIO_INPUT 3 | ||
44 | #define WM8903_GPn_FN_MICBIAS_CURRENT_DETECT 4 | ||
45 | #define WM8903_GPn_FN_MICBIAS_SHORT_DETECT 5 | ||
46 | #define WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT 6 | ||
47 | #define WM8903_GPn_FN_FLL_LOCK_OUTPUT 8 | ||
48 | #define WM8903_GPn_FN_FLL_CLOCK_OUTPUT 9 | ||
49 | |||
50 | /* | ||
40 | * R116 (0x74) - GPIO Control 1 | 51 | * R116 (0x74) - GPIO Control 1 |
41 | */ | 52 | */ |
42 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ | 53 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ |
@@ -231,6 +242,8 @@ | |||
231 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ | 242 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ |
232 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ | 243 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ |
233 | 244 | ||
245 | #define WM8903_NUM_GPIO 5 | ||
246 | |||
234 | struct wm8903_platform_data { | 247 | struct wm8903_platform_data { |
235 | bool irq_active_low; /* Set if IRQ active low, default high */ | 248 | bool irq_active_low; /* Set if IRQ active low, default high */ |
236 | 249 | ||
@@ -243,7 +256,8 @@ struct wm8903_platform_data { | |||
243 | 256 | ||
244 | int micdet_delay; /* Delay after microphone detection (ms) */ | 257 | int micdet_delay; /* Delay after microphone detection (ms) */ |
245 | 258 | ||
246 | u32 gpio_cfg[5]; /* Default register values for GPIO pin mux */ | 259 | int gpio_base; |
260 | u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */ | ||
247 | }; | 261 | }; |
248 | 262 | ||
249 | #endif | 263 | #endif |