diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/regulator/core.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0f65b246cc0c..d7448adc7a2c 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -1885,9 +1885,15 @@ int regulator_can_change_voltage(struct regulator *regulator) | |||
| 1885 | struct regulator_dev *rdev = regulator->rdev; | 1885 | struct regulator_dev *rdev = regulator->rdev; |
| 1886 | 1886 | ||
| 1887 | if (rdev->constraints && | 1887 | if (rdev->constraints && |
| 1888 | rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE && | 1888 | (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) { |
| 1889 | (rdev->desc->n_voltages - rdev->desc->linear_min_sel) > 1) | 1889 | if (rdev->desc->n_voltages - rdev->desc->linear_min_sel > 1) |
| 1890 | return 1; | 1890 | return 1; |
| 1891 | |||
| 1892 | if (rdev->desc->continuous_voltage_range && | ||
| 1893 | rdev->constraints->min_uV && rdev->constraints->max_uV && | ||
| 1894 | rdev->constraints->min_uV != rdev->constraints->max_uV) | ||
| 1895 | return 1; | ||
| 1896 | } | ||
| 1891 | 1897 | ||
| 1892 | return 0; | 1898 | return 0; |
| 1893 | } | 1899 | } |
