Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: include/sound/wm8903.h

Issue 6577007: CHROMIUM: ASoC: Import entire upstream ASoC tree (Closed)
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/sound/soc-dapm.h ('k') | include/trace/events/asoc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * linux/sound/wm8903.h -- Platform data for WM8903 2 * linux/sound/wm8903.h -- Platform data for WM8903
3 * 3 *
4 * Copyright 2010 Wolfson Microelectronics. PLC. 4 * Copyright 2010 Wolfson Microelectronics. PLC.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11 #ifndef __LINUX_SND_WM8903_H 11 #ifndef __LINUX_SND_WM8903_H
12 #define __LINUX_SND_WM8903_H 12 #define __LINUX_SND_WM8903_H
13 13
14 /* Used to enable configuration of a GPIO to all zeros */ 14 /* Used to enable configuration of a GPIO to all zeros */
15 #define WM8903_GPIO_NO_CONFIG 0x8000 15 #define WM8903_GPIO_NO_CONFIG 0x8000
16 16
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] */
30 #define WM8903_MICDET_ENA 0x0002 /* MICDET_ENA */ 26 #define WM8903_MICDET_ENA 0x0002 /* MICDET_ENA */
31 #define WM8903_MICDET_ENA_MASK 0x0002 /* MICDET_ENA */ 27 #define WM8903_MICDET_ENA_MASK 0x0002 /* MICDET_ENA */
32 #define WM8903_MICDET_ENA_SHIFT 1 /* MICDET_ENA */ 28 #define WM8903_MICDET_ENA_SHIFT 1 /* MICDET_ENA */
33 #define WM8903_MICDET_ENA_WIDTH 1 /* MICDET_ENA */ 29 #define WM8903_MICDET_ENA_WIDTH 1 /* MICDET_ENA */
34 #define WM8903_MICBIAS_ENA 0x0001 /* MICBIAS_ENA */ 30 #define WM8903_MICBIAS_ENA 0x0001 /* MICBIAS_ENA */
35 #define WM8903_MICBIAS_ENA_MASK 0x0001 /* MICBIAS_ENA */ 31 #define WM8903_MICBIAS_ENA_MASK 0x0001 /* MICBIAS_ENA */
36 #define WM8903_MICBIAS_ENA_SHIFT 0 /* MICBIAS_ENA */ 32 #define WM8903_MICBIAS_ENA_SHIFT 0 /* MICBIAS_ENA */
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] */
43 #define WM8903_GP1_FN_SHIFT 8 /* GP1_FN - [12:8] */ 54 #define WM8903_GP1_FN_SHIFT 8 /* GP1_FN - [12:8] */
44 #define WM8903_GP1_FN_WIDTH 5 /* GP1_FN - [12:8] */ 55 #define WM8903_GP1_FN_WIDTH 5 /* GP1_FN - [12:8] */
45 #define WM8903_GP1_DIR 0x0080 /* GP1_DIR */ 56 #define WM8903_GP1_DIR 0x0080 /* GP1_DIR */
46 #define WM8903_GP1_DIR_MASK 0x0080 /* GP1_DIR */ 57 #define WM8903_GP1_DIR_MASK 0x0080 /* GP1_DIR */
47 #define WM8903_GP1_DIR_SHIFT 7 /* GP1_DIR */ 58 #define WM8903_GP1_DIR_SHIFT 7 /* GP1_DIR */
48 #define WM8903_GP1_DIR_WIDTH 1 /* GP1_DIR */ 59 #define WM8903_GP1_DIR_WIDTH 1 /* GP1_DIR */
49 #define WM8903_GP1_OP_CFG 0x0040 /* GP1_OP_CFG */ 60 #define WM8903_GP1_OP_CFG 0x0040 /* GP1_OP_CFG */
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 #define WM8903_GP5_PU_WIDTH 1 /* GP5_PU */ 235 #define WM8903_GP5_PU_WIDTH 1 /* GP5_PU */
225 #define WM8903_GP5_INTMODE 0x0002 /* GP5_INTMODE */ 236 #define WM8903_GP5_INTMODE 0x0002 /* GP5_INTMODE */
226 #define WM8903_GP5_INTMODE_MASK 0x0002 /* GP5_INTMODE */ 237 #define WM8903_GP5_INTMODE_MASK 0x0002 /* GP5_INTMODE */
227 #define WM8903_GP5_INTMODE_SHIFT 1 /* GP5_INTMODE */ 238 #define WM8903_GP5_INTMODE_SHIFT 1 /* GP5_INTMODE */
228 #define WM8903_GP5_INTMODE_WIDTH 1 /* GP5_INTMODE */ 239 #define WM8903_GP5_INTMODE_WIDTH 1 /* GP5_INTMODE */
229 #define WM8903_GP5_DB 0x0001 /* GP5_DB */ 240 #define WM8903_GP5_DB 0x0001 /* GP5_DB */
230 #define WM8903_GP5_DB_MASK 0x0001 /* GP5_DB */ 241 #define WM8903_GP5_DB_MASK 0x0001 /* GP5_DB */
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
237 /* Default register value for R6 (Mic bias), used to configure 250 /* Default register value for R6 (Mic bias), used to configure
238 * microphone detection. In conjunction with gpio_cfg this 251 * microphone detection. In conjunction with gpio_cfg this
239 * can be used to route the microphone status signals out onto 252 * can be used to route the microphone status signals out onto
240 * the GPIOs for use with snd_soc_jack_add_gpios(). 253 * the GPIOs for use with snd_soc_jack_add_gpios().
241 */ 254 */
242 u16 micdet_cfg; 255 u16 micdet_cfg;
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 m ux */
247 }; 261 };
248 262
249 #endif 263 #endif
OLDNEW
« no previous file with comments | « include/sound/soc-dapm.h ('k') | include/trace/events/asoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698