Merge branch 'for-5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.1
This commit is contained in:
commit
1aad9f2f79
|
@ -135,7 +135,7 @@ static int pv88060_set_current_limit(struct regulator_dev *rdev, int min,
|
|||
int i;
|
||||
|
||||
/* search for closest to maximum */
|
||||
for (i = info->n_current_limits; i >= 0; i--) {
|
||||
for (i = info->n_current_limits - 1; i >= 0; i--) {
|
||||
if (min <= info->current_limits[i]
|
||||
&& max >= info->current_limits[i]) {
|
||||
return regmap_update_bits(rdev->regmap,
|
||||
|
|
|
@ -279,7 +279,7 @@ static int pv88080_set_current_limit(struct regulator_dev *rdev, int min,
|
|||
int i;
|
||||
|
||||
/* search for closest to maximum */
|
||||
for (i = info->n_current_limits; i >= 0; i--) {
|
||||
for (i = info->n_current_limits - 1; i >= 0; i--) {
|
||||
if (min <= info->current_limits[i]
|
||||
&& max >= info->current_limits[i]) {
|
||||
return regmap_update_bits(rdev->regmap,
|
||||
|
|
|
@ -157,7 +157,7 @@ static int pv88090_set_current_limit(struct regulator_dev *rdev, int min,
|
|||
int i;
|
||||
|
||||
/* search for closest to maximum */
|
||||
for (i = info->n_current_limits; i >= 0; i--) {
|
||||
for (i = info->n_current_limits - 1; i >= 0; i--) {
|
||||
if (min <= info->current_limits[i]
|
||||
&& max >= info->current_limits[i]) {
|
||||
return regmap_update_bits(rdev->regmap,
|
||||
|
|
|
@ -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--;
|
||||
|
|
|
@ -304,8 +304,8 @@ static int wm831x_buckv_get_voltage_sel(struct regulator_dev *rdev)
|
|||
}
|
||||
|
||||
/* Current limit options */
|
||||
static u16 wm831x_dcdc_ilim[] = {
|
||||
125, 250, 375, 500, 625, 750, 875, 1000
|
||||
static const unsigned int wm831x_dcdc_ilim[] = {
|
||||
125000, 250000, 375000, 500000, 625000, 750000, 875000, 1000000
|
||||
};
|
||||
|
||||
static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,
|
||||
|
|
Loading…
Reference in New Issue