diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-01-20 15:52:08 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-21 13:15:13 -0500 |
commit | 7cfe56172ac14d2031f1896ecb629033f71caafa (patch) | |
tree | 369220b82073bce8c6ba5db38e33ddcefa5cfaac /include/sound | |
parent | 9978007befa5efdc16dc940631c594f420f96b09 (diff) |
ASoC: wm8903: Expose GPIOs through gpiolib
Also, update platform_data GPIO handling to have an explicit "don't
touch this pin" option.
Add #defines for the GPIO pin functions.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/wm8903.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index b4a0db2307ef..86172cf4339f 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h | |||
@@ -37,6 +37,21 @@ | |||
37 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ | 37 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * WM8903_GPn_FN values | ||
41 | * | ||
42 | * See datasheets for list of valid values per pin | ||
43 | */ | ||
44 | #define WM8903_GPn_FN_GPIO_OUTPUT 0 | ||
45 | #define WM8903_GPn_FN_BCLK 1 | ||
46 | #define WM8903_GPn_FN_IRQ_OUTPT 2 | ||
47 | #define WM8903_GPn_FN_GPIO_INPUT 3 | ||
48 | #define WM8903_GPn_FN_MICBIAS_CURRENT_DETECT 4 | ||
49 | #define WM8903_GPn_FN_MICBIAS_SHORT_DETECT 5 | ||
50 | #define WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT 6 | ||
51 | #define WM8903_GPn_FN_FLL_LOCK_OUTPUT 8 | ||
52 | #define WM8903_GPn_FN_FLL_CLOCK_OUTPUT 9 | ||
53 | |||
54 | /* | ||
40 | * R116 (0x74) - GPIO Control 1 | 55 | * R116 (0x74) - GPIO Control 1 |
41 | */ | 56 | */ |
42 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ | 57 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ |
@@ -231,6 +246,8 @@ | |||
231 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ | 246 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ |
232 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ | 247 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ |
233 | 248 | ||
249 | #define WM8903_NUM_GPIO 5 | ||
250 | |||
234 | struct wm8903_platform_data { | 251 | struct wm8903_platform_data { |
235 | bool irq_active_low; /* Set if IRQ active low, default high */ | 252 | bool irq_active_low; /* Set if IRQ active low, default high */ |
236 | 253 | ||
@@ -243,7 +260,8 @@ struct wm8903_platform_data { | |||
243 | 260 | ||
244 | int micdet_delay; /* Delay after microphone detection (ms) */ | 261 | int micdet_delay; /* Delay after microphone detection (ms) */ |
245 | 262 | ||
246 | u32 gpio_cfg[5]; /* Default register values for GPIO pin mux */ | 263 | int gpio_base; |
264 | u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */ | ||
247 | }; | 265 | }; |
248 | 266 | ||
249 | #endif | 267 | #endif |