summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSascha Hauer2012-03-03 12:40:02 +0100
committerMark Brown2012-03-03 17:32:47 +0100
commit613330a0f73b2698b2210ea89092eb56635fc5d8 (patch)
tree1f7c5c94bc5c9e28ef54e29c310ae276499ba5e3 /include/linux
parentLinux 3.3-rc5 (diff)
downloadkernel-qcow2-linux-613330a0f73b2698b2210ea89092eb56635fc5d8.tar.gz
kernel-qcow2-linux-613330a0f73b2698b2210ea89092eb56635fc5d8.tar.xz
kernel-qcow2-linux-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')
-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 ffd7d508e726..936a7d8c11a9 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