Move the coupled regulators voltage balancing code to the separate function and allow to call it from the custom regulator couplers.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -62,6 +62,8 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev); · 61 unmodified lines | |||
| 62 | int regulator_set_voltage_rdev(struct regulator_dev *rdev, | 62 | int regulator_set_voltage_rdev(struct regulator_dev *rdev, |
| 63 | int min_uV, int max_uV, | 63 | int min_uV, int max_uV, |
| 64 | suspend_state_t state); | 64 | suspend_state_t state); |
| 65 | int regulator_do_balance_voltage(struct regulator_dev *rdev, | ||
| 66 | suspend_state_t state, bool skip_coupled); | ||
| 65 | #else | 67 | #else |
| 66 | static inline int regulator_coupler_register(struct regulator_coupler *coupler) | 68 | static inline int regulator_coupler_register(struct regulator_coupler *coupler) |
| 67 | { | 69 | { |
| @@ -92,6 +94,12 @@ static inline int regulator_set_voltage_rdev(struct regulator_dev *rdev, · 24 unmodified lines | |||
| 92 | { | 94 | { |
| 93 | return -EINVAL; | 95 | return -EINVAL; |
| 94 | } | 96 | } |
| 97 | static inline int regulator_do_balance_voltage(struct regulator_dev *rdev, | ||
| 98 | suspend_state_t state, | ||
| 99 | bool skip_coupled) | ||
| 100 | { | ||
| 101 | return -EINVAL; | ||
| 102 | } | ||
| 95 | #endif | 103 | #endif |
| 96 | 104 | ||
| 97 | #endif | 105 | #endif |