diff options
| author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-03-03 06:40:02 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-03 11:32:47 -0500 |
| commit | 613330a0f73b2698b2210ea89092eb56635fc5d8 (patch) | |
| tree | 1f7c5c94bc5c9e28ef54e29c310ae276499ba5e3 /include | |
| parent | 6b21d18ed50c7d145220b0724ea7f2613abf0f95 (diff) | |
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')
| -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 { | |||
| 48 | struct regulator_init_data *init_data; | 48 | struct regulator_init_data *init_data; |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | struct regulator_consumer_supply; | ||
| 52 | |||
| 53 | #if IS_ENABLED(CONFIG_REGULATOR) | ||
| 54 | struct platform_device *regulator_register_fixed(int id, | ||
| 55 | struct regulator_consumer_supply *supplies, int num_supplies); | ||
| 56 | #else | ||
| 57 | static inline struct platform_device *regulator_register_fixed(int id, | ||
| 58 | struct regulator_consumer_supply *supplies, int num_supplies) | ||
| 59 | { | ||
| 60 | return NULL; | ||
| 61 | } | ||
| 62 | #endif | ||
| 63 | |||
| 51 | #endif | 64 | #endif |
