summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-03-03 12:40:02 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-03 16:32:47 +0000
commit613330a0f73b2698b2210ea89092eb56635fc5d8 (patch)
tree1f7c5c94bc5c9e28ef54e29c310ae276499ba5e3 /include/linux/regulator
parent6b21d18ed50c7d145220b0724ea7f2613abf0f95 (diff)
downloadlinux-3.10-613330a0f73b2698b2210ea89092eb56635fc5d8.tar.gz
linux-3.10-613330a0f73b2698b2210ea89092eb56635fc5d8.tar.bz2
linux-3.10-613330a0f73b2698b2210ea89092eb56635fc5d8.zip
regulator: provide a helper for registering a fixed regulator
Some devices require a regulator to work, but boards may not have a software controllable regulator for this device. Provide a helper function to make it simpler for these boards to register a fixed regulator as a dummy regulator. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/fixed.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h
index ffd7d508e72..936a7d8c11a 100644
--- a/include/linux/regulator/fixed.h
+++ b/include/linux/regulator/fixed.h
@@ -48,4 +48,17 @@ struct fixed_voltage_config {
struct regulator_init_data *init_data;
};
+struct regulator_consumer_supply;
+
+#if IS_ENABLED(CONFIG_REGULATOR)
+struct platform_device *regulator_register_fixed(int id,
+ struct regulator_consumer_supply *supplies, int num_supplies);
+#else
+static inline struct platform_device *regulator_register_fixed(int id,
+ struct regulator_consumer_supply *supplies, int num_supplies)
+{
+ return NULL;
+}
+#endif
+
#endif