Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pdata.h
Go to the documentation of this file.
1 /*
2  * include/linux/mfd/wm8994/pdata.h -- Platform data for WM8994
3  *
4  * Copyright 2009 Wolfson Microelectronics PLC.
5  *
6  * Author: Mark Brown <[email protected]>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation; either version 2 of the License, or (at your
11  * option) any later version.
12  *
13  */
14 
15 #ifndef __MFD_WM8994_PDATA_H__
16 #define __MFD_WM8994_PDATA_H__
17 
18 #define WM8994_NUM_LDO 2
19 #define WM8994_NUM_GPIO 11
20 
23  int enable;
24 
26 };
27 
28 #define WM8994_CONFIGURE_GPIO 0x10000
29 
30 #define WM8994_DRC_REGS 5
31 #define WM8994_EQ_REGS 20
32 #define WM8958_MBC_CUTOFF_REGS 20
33 #define WM8958_MBC_COEFF_REGS 48
34 #define WM8958_MBC_COMBINED_REGS 56
35 #define WM8958_VSS_HPF_REGS 2
36 #define WM8958_VSS_REGS 148
37 #define WM8958_ENH_EQ_REGS 32
38 
50  const char *name;
52 };
53 
62  const char *name;
63  unsigned int rate;
65 };
66 
74  const char *name;
77 
78  /* Coefficient layout when using MBC+VSS firmware */
80 };
81 
89  const char *name;
91 };
92 
100  const char *name;
102 };
103 
111  const char *name;
113 };
114 
126  int sysclk;
127  bool idle;
128  int start;
129  int rate;
130 };
131 
132 struct wm8994_pdata {
134 
140 
142 
143  int irq_base;
144  unsigned long irq_flags;
148 
151 
154 
157 
160 
163 
166 
167  /* Power up delays to add after microphone bias power up (ms) */
170 
171  /* LINEOUT can be differential or single ended */
172  unsigned int lineout1_diff:1;
173  unsigned int lineout2_diff:1;
174 
175  /* Common mode feedback */
176  unsigned int lineout1fb:1;
177  unsigned int lineout2fb:1;
178 
179  /* IRQ for microphone detection if brought out directly as a
180  * signal.
181  */
183 
184  /* WM8994 microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */
185  unsigned int micbias1_lvl:1;
186  unsigned int micbias2_lvl:1;
187 
188  /* WM8994 jack detect threashold levels, see datasheet for values */
189  unsigned int jd_scthr:2;
190  unsigned int jd_thr:2;
191 
192  /* Configure WM1811 jack detection for use with external capacitor */
193  unsigned int jd_ext_cap:1;
194 
195  /* WM8958 microphone bias configuration */
196  int micbias[2];
197 
198  /* WM8958 microphone detection ranges */
200 
201  /* Disable the internal pull downs on the LDOs if they are
202  * always driven (eg, connected to an always on supply or
203  * GPIO that always drives an output. If they float power
204  * consumption will rise.
205  */
207 
208  /*
209  * SPKMODE must be pulled internally by the device on this
210  * system.
211  */
213 };
214 
215 #endif