summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-01-20 13:52:08 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-21 18:15:13 +0000
commit7cfe56172ac14d2031f1896ecb629033f71caafa (patch)
tree369220b82073bce8c6ba5db38e33ddcefa5cfaac /include/sound
parent9978007befa5efdc16dc940631c594f420f96b09 (diff)
downloadblackbird-op-linux-7cfe56172ac14d2031f1896ecb629033f71caafa.tar.gz
blackbird-op-linux-7cfe56172ac14d2031f1896ecb629033f71caafa.zip
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.h20
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 @@
#define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */
/*
+ * WM8903_GPn_FN values
+ *
+ * See datasheets for list of valid values per pin
+ */
+#define WM8903_GPn_FN_GPIO_OUTPUT 0
+#define WM8903_GPn_FN_BCLK 1
+#define WM8903_GPn_FN_IRQ_OUTPT 2
+#define WM8903_GPn_FN_GPIO_INPUT 3
+#define WM8903_GPn_FN_MICBIAS_CURRENT_DETECT 4
+#define WM8903_GPn_FN_MICBIAS_SHORT_DETECT 5
+#define WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT 6
+#define WM8903_GPn_FN_FLL_LOCK_OUTPUT 8
+#define WM8903_GPn_FN_FLL_CLOCK_OUTPUT 9
+
+/*
* R116 (0x74) - GPIO Control 1
*/
#define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */
@@ -231,6 +246,8 @@
#define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */
#define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */
+#define WM8903_NUM_GPIO 5
+
struct wm8903_platform_data {
bool irq_active_low; /* Set if IRQ active low, default high */
@@ -243,7 +260,8 @@ struct wm8903_platform_data {
int micdet_delay; /* Delay after microphone detection (ms) */
- u32 gpio_cfg[5]; /* Default register values for GPIO pin mux */
+ int gpio_base;
+ u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */
};
#endif
OpenPOWER on IntegriCloud