aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regulator/driver.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 2254ad93b784..c263e36e564e 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -137,6 +137,38 @@ struct regulator_desc {
137 struct module *owner; 137 struct module *owner;
138}; 138};
139 139
140/*
141 * struct regulator_dev
142 *
143 * Voltage / Current regulator class device. One for each
144 * regulator.
145 *
146 * This should *not* be used directly by anything except the regulator
147 * core and notification injection (which should take the mutex and do
148 * no other direct access).
149 */
150struct regulator_dev {
151 struct regulator_desc *desc;
152 int use_count;
153
154 /* lists we belong to */
155 struct list_head list; /* list of all regulators */
156 struct list_head slist; /* list of supplied regulators */
157
158 /* lists we own */
159 struct list_head consumer_list; /* consumers we supply */
160 struct list_head supply_list; /* regulators we supply */
161
162 struct blocking_notifier_head notifier;
163 struct mutex mutex; /* consumer lock */
164 struct module *owner;
165 struct device dev;
166 struct regulation_constraints *constraints;
167 struct regulator_dev *supply; /* for tree */
168
169 void *reg_data; /* regulator_dev data */
170};
171
140struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 172struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
141 struct device *dev, struct regulator_init_data *init_data, 173 struct device *dev, struct regulator_init_data *init_data,
142 void *driver_data); 174 void *driver_data);