aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-14 19:38:27 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-14 19:38:27 -0500
commita1ed63f4db7f7734dfed8d158eddd3cdeda771fa (patch)
tree85b1937008b8017d18ffa6fa245516b4a020f488 /drivers
parent9931faca02c604c22335f5a935a501bb2ace6e20 (diff)
parent0384618a79ccfafd05ca1538867764f7c4b7916b (diff)
Merge remote-tracking branch 'regulator/fix/core' into tmp
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 0f65b246cc0c..278584302f2d 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}
@@ -3315,7 +3321,8 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)
3315 * @config: runtime configuration for regulator 3321 * @config: runtime configuration for regulator
3316 * 3322 *
3317 * Called by regulator drivers to register a regulator. 3323 * Called by regulator drivers to register a regulator.
3318 * Returns 0 on success. 3324 * Returns a valid pointer to struct regulator_dev on success
3325 * or an ERR_PTR() on error.
3319 */ 3326 */
3320struct regulator_dev * 3327struct regulator_dev *
3321regulator_register(const struct regulator_desc *regulator_desc, 3328regulator_register(const struct regulator_desc *regulator_desc,