diff options
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/driver.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 1dcdf00e0db2..4f529ed48d4c 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -148,10 +148,12 @@ enum regulator_type { | |||
148 | }; | 148 | }; |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * struct regulator_desc - Regulator descriptor | 151 | * struct regulator_desc - Static regulator descriptor |
152 | * | 152 | * |
153 | * Each regulator registered with the core is described with a structure of | 153 | * Each regulator registered with the core is described with a |
154 | * this type. | 154 | * structure of this type and a struct regulator_config. This |
155 | * structure contains the non-varying parts of the regulator | ||
156 | * description. | ||
155 | * | 157 | * |
156 | * @name: Identifying name for the regulator. | 158 | * @name: Identifying name for the regulator. |
157 | * @supply_name: Identifying the regulator supply | 159 | * @supply_name: Identifying the regulator supply |
@@ -173,6 +175,26 @@ struct regulator_desc { | |||
173 | struct module *owner; | 175 | struct module *owner; |
174 | }; | 176 | }; |
175 | 177 | ||
178 | /** | ||
179 | * struct regulator_config - Dynamic regulator descriptor | ||
180 | * | ||
181 | * Each regulator registered with the core is described with a | ||
182 | * structure of this type and a struct regulator_desc. This structure | ||
183 | * contains the runtime variable parts of the regulator description. | ||
184 | * | ||
185 | * @dev: struct device for the regulator | ||
186 | * @init_data: platform provided init data, passed through by driver | ||
187 | * @driver_data: private regulator data | ||
188 | * @of_node: OpenFirmware node to parse for device tree bindings (may be | ||
189 | * NULL). | ||
190 | */ | ||
191 | struct regulator_config { | ||
192 | struct device *dev; | ||
193 | const struct regulator_init_data *init_data; | ||
194 | void *driver_data; | ||
195 | struct device_node *of_node; | ||
196 | }; | ||
197 | |||
176 | /* | 198 | /* |
177 | * struct regulator_dev | 199 | * struct regulator_dev |
178 | * | 200 | * |
@@ -212,8 +234,7 @@ struct regulator_dev { | |||
212 | 234 | ||
213 | struct regulator_dev * | 235 | struct regulator_dev * |
214 | regulator_register(const struct regulator_desc *regulator_desc, | 236 | regulator_register(const struct regulator_desc *regulator_desc, |
215 | struct device *dev, const struct regulator_init_data *init_data, | 237 | const struct regulator_config *config); |
216 | void *driver_data, struct device_node *of_node); | ||
217 | void regulator_unregister(struct regulator_dev *rdev); | 238 | void regulator_unregister(struct regulator_dev *rdev); |
218 | 239 | ||
219 | int regulator_notifier_call_chain(struct regulator_dev *rdev, | 240 | int regulator_notifier_call_chain(struct regulator_dev *rdev, |