diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/regulator/consumer.h | 6 | ||||
-rw-r--r-- | include/linux/regulator/driver.h | 2 | ||||
-rw-r--r-- | include/linux/regulator/fixed.h | 11 |
3 files changed, 15 insertions, 4 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 4ed1b30ac5fc..da339fd8c755 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -291,6 +291,12 @@ static inline int regulator_set_voltage(struct regulator *regulator, static inline int regulator_get_voltage(struct regulator *regulator) { + return -EINVAL; +} + +static inline int regulator_is_supported_voltage(struct regulator *regulator, + int min_uV, int max_uV) +{ return 0; } diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index b1b7b8b43ece..bac4c871f3bd 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -32,6 +32,8 @@ enum regulator_status { REGULATOR_STATUS_NORMAL, REGULATOR_STATUS_IDLE, REGULATOR_STATUS_STANDBY, + /* in case that any other status doesn't apply */ + REGULATOR_STATUS_UNDEFINED, }; /** diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index d6c24c53adf4..48918be649d4 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h @@ -60,14 +60,17 @@ struct fixed_voltage_config { 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); +struct platform_device *regulator_register_always_on(int id, const char *name, + struct regulator_consumer_supply *supplies, int num_supplies, int uv); #else -static inline struct platform_device *regulator_register_fixed(int id, - struct regulator_consumer_supply *supplies, int num_supplies) +static inline struct platform_device *regulator_register_always_on(int id, const char *name, + struct regulator_consumer_supply *supplies, int num_supplies, int uv) { return NULL; } #endif +#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \ + "fixed-dummy", s, ns, 0) + #endif |