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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user