2 * include/linux/mfd/wm8994/pdata.h -- Platform data for WM8994
4 * Copyright 2009 Wolfson Microelectronics PLC.
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
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.
15 #ifndef __MFD_WM8994_PDATA_H__
16 #define __MFD_WM8994_PDATA_H__
18 #define WM8994_NUM_LDO 2
19 #define WM8994_NUM_GPIO 11
21 struct wm8994_ldo_pdata {
22 /** GPIOs to enable regulator, 0 or less if not available */
26 struct regulator_init_data *init_data;
29 #define WM8994_CONFIGURE_GPIO 0x8000
31 #define WM8994_DRC_REGS 5
32 #define WM8994_EQ_REGS 19
35 * DRC configurations are specified with a label and a set of register
36 * values to write (the enable bits will be ignored). At runtime an
37 * enumerated control will be presented for each DRC block allowing
38 * the user to choose the configration to use.
40 * Configurations may be generated by hand or by using the DRC control
41 * panel provided by the WISCE - see http://www.wolfsonmicro.com/wisce/
44 struct wm8994_drc_cfg {
46 u16 regs[WM8994_DRC_REGS];
50 * ReTune Mobile configurations are specified with a label, sample
51 * rate and set of values to write (the enable bits will be ignored).
53 * Configurations are expected to be generated using the ReTune Mobile
54 * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
56 struct wm8994_retune_mobile_cfg {
59 u16 regs[WM8994_EQ_REGS];
66 * Default values for GPIOs if non-zero, WM8994_CONFIGURE_GPIO
67 * can be used for all zero values.
69 int gpio_defaults[WM8994_NUM_GPIO];
71 struct wm8994_ldo_pdata ldo[WM8994_NUM_LDO];
73 int irq_base; /** Base IRQ number for WM8994, required for IRQs */
76 struct wm8994_drc_cfg *drc_cfgs;
78 int num_retune_mobile_cfgs;
79 struct wm8994_retune_mobile_cfg *retune_mobile_cfgs;
81 /* LINEOUT can be differential or single ended */
82 unsigned int lineout1_diff:1;
83 unsigned int lineout2_diff:1;
85 /* Common mode feedback */
86 unsigned int lineout1fb:1;
87 unsigned int lineout2fb:1;
89 /* Microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */
90 unsigned int micbias1_lvl:1;
91 unsigned int micbias2_lvl:1;
93 /* Jack detect threashold levels, see datasheet for values */
94 unsigned int jd_scthr:2;
95 unsigned int jd_thr:2;