aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/wm8903.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/wm8903.h')
-rw-r--r--include/sound/wm8903.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h
index 1eeebd534f7e..cf7ccb76a8de 100644
--- a/include/sound/wm8903.h
+++ b/include/sound/wm8903.h
@@ -33,6 +33,21 @@
33#define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ 33#define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */
34 34
35/* 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/*
36 * R116 (0x74) - GPIO Control 1 51 * R116 (0x74) - GPIO Control 1
37 */ 52 */
38#define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ 53#define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */
@@ -227,6 +242,8 @@
227#define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ 242#define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */
228#define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ 243#define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */
229 244
245#define WM8903_NUM_GPIO 5
246
230struct wm8903_platform_data { 247struct wm8903_platform_data {
231 bool irq_active_low; /* Set if IRQ active low, default high */ 248 bool irq_active_low; /* Set if IRQ active low, default high */
232 249
@@ -239,7 +256,8 @@ struct wm8903_platform_data {
239 256
240 int micdet_delay; /* Delay after microphone detection (ms) */ 257 int micdet_delay; /* Delay after microphone detection (ms) */
241 258
242 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 */
243}; 261};
244 262
245#endif 263#endif