aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-27 23:37:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-27 23:37:50 -0400
commit18bcd0c8cb7d85a9063b88ec810dc1cdc0974518 (patch)
tree2a27d7b53a221f79169014c79e80f721663434a5 /include
parent7b724a2260731edbddadfa08f13de5bce2e601a2 (diff)
parenta51b907b2ecdfd3830576733810233f00dcfb2af (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998 regulator: fix tps6524x section mismatch regulator: Remove more wm831x-specific IRQ operations regulator: add ab8500 enable and raise time delays regulator: provide consumer interface for fall/rise time regulator: add set_voltage_time_sel infrastructure regulator: initialization for ab8500 regulators regulator: add support for USB voltage regulator regulator: switch the ab3100 to use enable_time() Regulator: add suspend-finish API for regulator core. regulator: fix typo in Kconfig regulator: Convert WM831x regulators to genirq regulator: If we fail when setting up a supply say which supply
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/ab8500.h6
-rw-r--r--include/linux/regulator/ab8500.h51
-rw-r--r--include/linux/regulator/consumer.h2
-rw-r--r--include/linux/regulator/driver.h11
-rw-r--r--include/linux/regulator/machine.h1
5 files changed, 67 insertions, 4 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h
index 56f8dea72152..6e4f77ef4d20 100644
--- a/include/linux/mfd/ab8500.h
+++ b/include/linux/mfd/ab8500.h
@@ -139,17 +139,23 @@ struct ab8500 {
139 u8 oldmask[AB8500_NUM_IRQ_REGS]; 139 u8 oldmask[AB8500_NUM_IRQ_REGS];
140}; 140};
141 141
142struct regulator_reg_init;
142struct regulator_init_data; 143struct regulator_init_data;
143 144
144/** 145/**
145 * struct ab8500_platform_data - AB8500 platform data 146 * struct ab8500_platform_data - AB8500 platform data
146 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used 147 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
147 * @init: board-specific initialization after detection of ab8500 148 * @init: board-specific initialization after detection of ab8500
149 * @num_regulator_reg_init: number of regulator init registers
150 * @regulator_reg_init: regulator init registers
151 * @num_regulator: number of regulators
148 * @regulator: machine-specific constraints for regulators 152 * @regulator: machine-specific constraints for regulators
149 */ 153 */
150struct ab8500_platform_data { 154struct ab8500_platform_data {
151 int irq_base; 155 int irq_base;
152 void (*init) (struct ab8500 *); 156 void (*init) (struct ab8500 *);
157 int num_regulator_reg_init;
158 struct ab8500_regulator_reg_init *regulator_reg_init;
153 int num_regulator; 159 int num_regulator;
154 struct regulator_init_data *regulator; 160 struct regulator_init_data *regulator;
155}; 161};
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 6a210f1511fc..76579f964a29 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * License Terms: GNU General Public License v2 4 * License Terms: GNU General Public License v2
5 * 5 *
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson 6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
7 * 7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
8 */ 8 */
9 9
10#ifndef __LINUX_MFD_AB8500_REGULATOR_H 10#ifndef __LINUX_MFD_AB8500_REGULATOR_H
@@ -17,6 +17,7 @@ enum ab8500_regulator_id {
17 AB8500_LDO_AUX3, 17 AB8500_LDO_AUX3,
18 AB8500_LDO_INTCORE, 18 AB8500_LDO_INTCORE,
19 AB8500_LDO_TVOUT, 19 AB8500_LDO_TVOUT,
20 AB8500_LDO_USB,
20 AB8500_LDO_AUDIO, 21 AB8500_LDO_AUDIO,
21 AB8500_LDO_ANAMIC1, 22 AB8500_LDO_ANAMIC1,
22 AB8500_LDO_ANAMIC2, 23 AB8500_LDO_ANAMIC2,
@@ -24,4 +25,50 @@ enum ab8500_regulator_id {
24 AB8500_LDO_ANA, 25 AB8500_LDO_ANA,
25 AB8500_NUM_REGULATORS, 26 AB8500_NUM_REGULATORS,
26}; 27};
28
29/* AB8500 register initialization */
30struct ab8500_regulator_reg_init {
31 int id;
32 u8 value;
33};
34
35#define INIT_REGULATOR_REGISTER(_id, _value) \
36 { \
37 .id = _id, \
38 .value = _value, \
39 }
40
41/* AB8500 registers */
42enum ab8500_regulator_reg {
43 AB8500_REGUREQUESTCTRL2,
44 AB8500_REGUREQUESTCTRL3,
45 AB8500_REGUREQUESTCTRL4,
46 AB8500_REGUSYSCLKREQ1HPVALID1,
47 AB8500_REGUSYSCLKREQ1HPVALID2,
48 AB8500_REGUHWHPREQ1VALID1,
49 AB8500_REGUHWHPREQ1VALID2,
50 AB8500_REGUHWHPREQ2VALID1,
51 AB8500_REGUHWHPREQ2VALID2,
52 AB8500_REGUSWHPREQVALID1,
53 AB8500_REGUSWHPREQVALID2,
54 AB8500_REGUSYSCLKREQVALID1,
55 AB8500_REGUSYSCLKREQVALID2,
56 AB8500_REGUMISC1,
57 AB8500_VAUDIOSUPPLY,
58 AB8500_REGUCTRL1VAMIC,
59 AB8500_VPLLVANAREGU,
60 AB8500_VREFDDR,
61 AB8500_EXTSUPPLYREGU,
62 AB8500_VAUX12REGU,
63 AB8500_VRF1VAUX3REGU,
64 AB8500_VAUX1SEL,
65 AB8500_VAUX2SEL,
66 AB8500_VRF1VAUX3SEL,
67 AB8500_REGUCTRL2SPARE,
68 AB8500_REGUCTRLDISCH,
69 AB8500_REGUCTRLDISCH2,
70 AB8500_VSMPS1SEL1,
71 AB8500_NUM_REGULATOR_REGISTERS,
72};
73
27#endif 74#endif
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 7954f6bd7edb..9e87c1cb7270 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector);
153int regulator_is_supported_voltage(struct regulator *regulator, 153int regulator_is_supported_voltage(struct regulator *regulator,
154 int min_uV, int max_uV); 154 int min_uV, int max_uV);
155int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); 155int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
156int regulator_set_voltage_time(struct regulator *regulator,
157 int old_uV, int new_uV);
156int regulator_get_voltage(struct regulator *regulator); 158int regulator_get_voltage(struct regulator *regulator);
157int regulator_sync_voltage(struct regulator *regulator); 159int regulator_sync_voltage(struct regulator *regulator);
158int regulator_set_current_limit(struct regulator *regulator, 160int regulator_set_current_limit(struct regulator *regulator,
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index b8ed16a33c47..6c433b89c80d 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -63,7 +63,11 @@ enum regulator_status {
63 * when running with the specified parameters. 63 * when running with the specified parameters.
64 * 64 *
65 * @enable_time: Time taken for the regulator voltage output voltage to 65 * @enable_time: Time taken for the regulator voltage output voltage to
66 * stabalise after being enabled, in microseconds. 66 * stabilise after being enabled, in microseconds.
67 * @set_voltage_time_sel: Time taken for the regulator voltage output voltage
68 * to stabilise after being set to a new value, in microseconds.
69 * The function provides the from and to voltage selector, the
70 * function should return the worst case.
67 * 71 *
68 * @set_suspend_voltage: Set the voltage for the regulator when the system 72 * @set_suspend_voltage: Set the voltage for the regulator when the system
69 * is suspended. 73 * is suspended.
@@ -103,8 +107,11 @@ struct regulator_ops {
103 int (*set_mode) (struct regulator_dev *, unsigned int mode); 107 int (*set_mode) (struct regulator_dev *, unsigned int mode);
104 unsigned int (*get_mode) (struct regulator_dev *); 108 unsigned int (*get_mode) (struct regulator_dev *);
105 109
106 /* Time taken to enable the regulator */ 110 /* Time taken to enable or set voltage on the regulator */
107 int (*enable_time) (struct regulator_dev *); 111 int (*enable_time) (struct regulator_dev *);
112 int (*set_voltage_time_sel) (struct regulator_dev *,
113 unsigned int old_selector,
114 unsigned int new_selector);
108 115
109 /* report regulator status ... most other accessors report 116 /* report regulator status ... most other accessors report
110 * control inputs, this reports results of combining inputs 117 * control inputs, this reports results of combining inputs
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 761c745b9c24..c4c4fc45f856 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -186,6 +186,7 @@ struct regulator_init_data {
186}; 186};
187 187
188int regulator_suspend_prepare(suspend_state_t state); 188int regulator_suspend_prepare(suspend_state_t state);
189int regulator_suspend_finish(void);
189 190
190#ifdef CONFIG_REGULATOR 191#ifdef CONFIG_REGULATOR
191void regulator_has_full_constraints(void); 192void regulator_has_full_constraints(void);