diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-15 06:16:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-16 14:51:53 -0400 |
commit | 65b19ce6c223287ac95bbc22b12ef5a2738472d1 (patch) | |
tree | a2cf084107796be58d1e3b3c02b1d8d3171ce8c6 /include/linux/regulator/driver.h | |
parent | 9f29c9e30b98832d98e8f528252fe193123a7d80 (diff) |
regulator: core: Allow drivers to pass in a regmap
Since many regulators use regmap for register I/O and since there's quite
a few very common patterns in the code allow drivers to pass in a regmap
to the core for use in generic code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r-- | include/linux/regulator/driver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4f529ed48d4c..2e753731217b 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
21 | 21 | ||
22 | struct regmap; | ||
22 | struct regulator_dev; | 23 | struct regulator_dev; |
23 | struct regulator_init_data; | 24 | struct regulator_init_data; |
24 | 25 | ||
@@ -187,12 +188,14 @@ struct regulator_desc { | |||
187 | * @driver_data: private regulator data | 188 | * @driver_data: private regulator data |
188 | * @of_node: OpenFirmware node to parse for device tree bindings (may be | 189 | * @of_node: OpenFirmware node to parse for device tree bindings (may be |
189 | * NULL). | 190 | * NULL). |
191 | * @regmap: regmap to use for core regmap helpers | ||
190 | */ | 192 | */ |
191 | struct regulator_config { | 193 | struct regulator_config { |
192 | struct device *dev; | 194 | struct device *dev; |
193 | const struct regulator_init_data *init_data; | 195 | const struct regulator_init_data *init_data; |
194 | void *driver_data; | 196 | void *driver_data; |
195 | struct device_node *of_node; | 197 | struct device_node *of_node; |
198 | struct regmap *regmap; | ||
196 | }; | 199 | }; |
197 | 200 | ||
198 | /* | 201 | /* |
@@ -223,6 +226,7 @@ struct regulator_dev { | |||
223 | struct device dev; | 226 | struct device dev; |
224 | struct regulation_constraints *constraints; | 227 | struct regulation_constraints *constraints; |
225 | struct regulator *supply; /* for tree */ | 228 | struct regulator *supply; /* for tree */ |
229 | struct regmap *regmap; | ||
226 | 230 | ||
227 | struct delayed_work disable_work; | 231 | struct delayed_work disable_work; |
228 | int deferred_disables; | 232 | int deferred_disables; |