regulator: core: Expose some of core functions needed by couplers
Expose some of internal functions that are required for implementation of customized regulator couplers. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
d8ca7d184b
commit
d22b85a1b9
@@ -52,11 +52,46 @@ struct regulator_coupler {
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
int regulator_coupler_register(struct regulator_coupler *coupler);
|
||||
const char *rdev_get_name(struct regulator_dev *rdev);
|
||||
int regulator_check_consumers(struct regulator_dev *rdev,
|
||||
int *min_uV, int *max_uV,
|
||||
suspend_state_t state);
|
||||
int regulator_check_voltage(struct regulator_dev *rdev,
|
||||
int *min_uV, int *max_uV);
|
||||
int regulator_get_voltage_rdev(struct regulator_dev *rdev);
|
||||
int regulator_set_voltage_rdev(struct regulator_dev *rdev,
|
||||
int min_uV, int max_uV,
|
||||
suspend_state_t state);
|
||||
#else
|
||||
static inline int regulator_coupler_register(struct regulator_coupler *coupler)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline const char *rdev_get_name(struct regulator_dev *rdev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline int regulator_check_consumers(struct regulator_dev *rdev,
|
||||
int *min_uV, int *max_uV,
|
||||
suspend_state_t state)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int regulator_check_voltage(struct regulator_dev *rdev,
|
||||
int *min_uV, int *max_uV)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int regulator_get_voltage_rdev(struct regulator_dev *rdev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int regulator_set_voltage_rdev(struct regulator_dev *rdev,
|
||||
int min_uV, int max_uV,
|
||||
suspend_state_t state)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user