diff options
author | Mark Brown <broonie@kernel.org> | 2019-03-04 00:49:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-04 00:49:46 +0100 |
commit | 1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9 (patch) | |
tree | 6d98b9475d43d035f597c4139fdd7587b46fae8e /drivers/regulator/tps65218-regulator.c | |
parent | regulator: max77650: Convert to use regulator_set/get_current_limit_regmap (diff) | |
parent | regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA (diff) | |
download | linux-1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9.tar.xz linux-1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9.zip |
Merge branch 'for-5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.1
Diffstat (limited to 'drivers/regulator/tps65218-regulator.c')
-rw-r--r-- | drivers/regulator/tps65218-regulator.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index df333b7702cb..95708d34876b 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c @@ -188,7 +188,8 @@ static struct regulator_ops tps65218_ldo1_dcdc34_ops = { .set_suspend_disable = tps65218_pmic_set_suspend_disable, }; -static const int ls3_currents[] = { 100, 200, 500, 1000 }; +static const int ls3_currents[] = { 100000, 200000, 500000, 1000000 }; + static int tps65218_pmic_set_input_current_lim(struct regulator_dev *dev, int lim_uA) @@ -215,7 +216,7 @@ static int tps65218_pmic_set_current_limit(struct regulator_dev *dev, unsigned int num_currents = ARRAY_SIZE(ls3_currents); struct tps65218 *tps = rdev_get_drvdata(dev); - while (index < num_currents && ls3_currents[index] < max_uA) + while (index < num_currents && ls3_currents[index] <= max_uA) index++; index--; |