regulator: extract voltage balancing code to the separate function
Move the coupled regulators voltage balancing code to the separate function and allow to call it from the custom regulator couplers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20200529124940.10675-2-m.szyprowski@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
8f3d9f3542
commit
752db83a5d
@@ -62,6 +62,8 @@ 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);
|
||||
int regulator_do_balance_voltage(struct regulator_dev *rdev,
|
||||
suspend_state_t state, bool skip_coupled);
|
||||
#else
|
||||
static inline int regulator_coupler_register(struct regulator_coupler *coupler)
|
||||
{
|
||||
@@ -92,6 +94,12 @@ static inline int regulator_set_voltage_rdev(struct regulator_dev *rdev,
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int regulator_do_balance_voltage(struct regulator_dev *rdev,
|
||||
suspend_state_t state,
|
||||
bool skip_coupled)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user