diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-07 18:56:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-07 18:56:04 -0500 |
commit | 6dc3eb5c1f96641cda7056aa34393e317076d6cf (patch) | |
tree | 9a615b884d7ff5375382b5a3f020f518f618c589 /include/linux/mfd/wm8994/pdata.h | |
parent | 8fe900b8c7aa6a307e552ff776e0c04c28dcf9c8 (diff) | |
parent | 2c08583c6a6b4c5f5dea4cb0931eca82af7db6fe (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (66 commits)
mfd: Fix ucb1x00 build failure for collie_defconfig
mfd: Fix lpc_sch related depends/selects, fix build error
gpio: Fix sch_gpio warning
gpio: add Intel SCH GPIO controller driver
i2c: convert i2c-isch to platform_device
mfd: Use completion interrupt for WM831x AUXADC
mfd: Use completion interrupt for WM835x AUXADC
mfd: Introduce remove_script function for twl4030
mfd/mmc: SDHI Kconfig update
mfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support
gpiolib: Force wm831x GPIOs into GPIO mode when requested
mfd: Add WM831x revision B support
gpiolib: Correct debugfs display of WM831x GPIO inversion
gpiolib: Actually set output state in wm831x_gpio_direction_output()
tmio_mmc: Balance cell enable()/disable() calls
tmio_mmc: Remove const from platform data V3
tmio_mmc: Use 100ms mmc_detect_change() delay
tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
tmio_mmc: Keep card-detect interrupts enabled
mfd: Add twl6030 base addr for ID0, ID1, ID2
...
Diffstat (limited to 'include/linux/mfd/wm8994/pdata.h')
-rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h new file mode 100644 index 000000000000..70d6a8687dc5 --- /dev/null +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * include/linux/mfd/wm8994/pdata.h -- Platform data for WM8994 | ||
3 | * | ||
4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
5 | * | ||
6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
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 | |||
21 | struct wm8994_ldo_pdata { | ||
22 | /** GPIOs to enable regulator, 0 or less if not available */ | ||
23 | int enable; | ||
24 | |||
25 | const char *supply; | ||
26 | struct regulator_init_data *init_data; | ||
27 | }; | ||
28 | |||
29 | #define WM8994_CONFIGURE_GPIO 0x8000 | ||
30 | |||
31 | #define WM8994_DRC_REGS 5 | ||
32 | #define WM8994_EQ_REGS 19 | ||
33 | |||
34 | /** | ||
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. | ||
39 | * | ||
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/ | ||
42 | * for details. | ||
43 | */ | ||
44 | struct wm8994_drc_cfg { | ||
45 | const char *name; | ||
46 | u16 regs[WM8994_DRC_REGS]; | ||
47 | }; | ||
48 | |||
49 | /** | ||
50 | * ReTune Mobile configurations are specified with a label, sample | ||
51 | * rate and set of values to write (the enable bits will be ignored). | ||
52 | * | ||
53 | * Configurations are expected to be generated using the ReTune Mobile | ||
54 | * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
55 | */ | ||
56 | struct wm8994_retune_mobile_cfg { | ||
57 | const char *name; | ||
58 | unsigned int rate; | ||
59 | u16 regs[WM8994_EQ_REGS]; | ||
60 | }; | ||
61 | |||
62 | struct wm8994_pdata { | ||
63 | int gpio_base; | ||
64 | |||
65 | /** | ||
66 | * Default values for GPIOs if non-zero, WM8994_CONFIGURE_GPIO | ||
67 | * can be used for all zero values. | ||
68 | */ | ||
69 | int gpio_defaults[WM8994_NUM_GPIO]; | ||
70 | |||
71 | struct wm8994_ldo_pdata ldo[WM8994_NUM_LDO]; | ||
72 | |||
73 | |||
74 | int num_drc_cfgs; | ||
75 | struct wm8994_drc_cfg *drc_cfgs; | ||
76 | |||
77 | int num_retune_mobile_cfgs; | ||
78 | struct wm8994_retune_mobile_cfg *retune_mobile_cfgs; | ||
79 | |||
80 | /* LINEOUT can be differential or single ended */ | ||
81 | unsigned int lineout1_diff:1; | ||
82 | unsigned int lineout2_diff:1; | ||
83 | |||
84 | /* Common mode feedback */ | ||
85 | unsigned int lineout1fb:1; | ||
86 | unsigned int lineout2fb:1; | ||
87 | |||
88 | /* Microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */ | ||
89 | unsigned int micbias1_lvl:1; | ||
90 | unsigned int micbias2_lvl:1; | ||
91 | |||
92 | /* Jack detect threashold levels, see datasheet for values */ | ||
93 | unsigned int jd_scthr:2; | ||
94 | unsigned int jd_thr:2; | ||
95 | }; | ||
96 | |||
97 | #endif | ||