summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-06-19 19:43:56 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-20 02:22:30 +0400
commitdfad84aeab5f71b33a12e6803a809f698bdef5a2 (patch)
treefab2197c2b5931cecf6725147dc146347b543a3e /include/linux/regulator
parent485802a6c524e62b5924849dd727ddbb1497cc71 (diff)
downloadlinux-dfad84aeab5f71b33a12e6803a809f698bdef5a2.tar.xz
regulator: support multiple dummy fixed regulators
Currently regulator_register_fixed() uses a constant name to register a fixed dummy regulator. This is sufficient in principle, since there is no reason to register multiple such regulators. The user can simply supply all consumers in one array and use it to initialise such a regulator. However, in some cases it can be convenient to register multiple such regulators. This is also a prerequisite for the upcoming patch, that will add a voltage parameter to this function. The original function is provided as a wrapper macro. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/fixed.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h
index f83f7440b488..6b9325b5e371 100644
--- a/include/linux/regulator/fixed.h
+++ b/include/linux/regulator/fixed.h
@@ -58,14 +58,17 @@ struct fixed_voltage_config {
struct regulator_consumer_supply;
#if IS_ENABLED(CONFIG_REGULATOR)
-struct platform_device *regulator_register_fixed(int id,
+struct platform_device *regulator_register_always_on(int id, const char *name,
struct regulator_consumer_supply *supplies, int num_supplies);
#else
-static inline struct platform_device *regulator_register_fixed(int id,
+static inline struct platform_device *regulator_register_always_on(int id, const char *name,
struct regulator_consumer_supply *supplies, int num_supplies)
{
return NULL;
}
#endif
+#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
+ "fixed-dummy", s, ns)
+
#endif