diff options
author | Sascha Hauer | 2012-03-03 12:40:02 +0100 |
---|---|---|
committer | Mark Brown | 2012-03-03 17:32:47 +0100 |
commit | 613330a0f73b2698b2210ea89092eb56635fc5d8 (patch) | |
tree | 1f7c5c94bc5c9e28ef54e29c310ae276499ba5e3 /include/linux | |
parent | Linux 3.3-rc5 (diff) | |
download | kernel-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.h | 13 |
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 |