Skip to content

Commit df9edcb

Browse files
committed
Merge tag 'regulator-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "A few small driver specific fixes here plus one core fix for a refcounting problem with DT which will have little practical impact unless overlays are used" * tag 'regulator-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: of: Add of_node_put() before return in function regulator: lp87565: Fix probe failure for "ti,lp87565" regulator: axp20x: fix DCDC5 and DCDC6 for AXP803 regulator: axp20x: fix DCDCA and DCDCD for AXP806
2 parents 9e9671c + 811ba48 commit df9edcb

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

drivers/regulator/axp20x-regulator.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@
174174
#define AXP803_DCDC5_1140mV_STEPS 35
175175
#define AXP803_DCDC5_1140mV_END \
176176
(AXP803_DCDC5_1140mV_START + AXP803_DCDC5_1140mV_STEPS)
177-
#define AXP803_DCDC5_NUM_VOLTAGES 68
177+
#define AXP803_DCDC5_NUM_VOLTAGES 69
178178

179179
#define AXP803_DCDC6_600mV_START 0x00
180180
#define AXP803_DCDC6_600mV_STEPS 50
181181
#define AXP803_DCDC6_600mV_END \
182182
(AXP803_DCDC6_600mV_START + AXP803_DCDC6_600mV_STEPS)
183183
#define AXP803_DCDC6_1120mV_START 0x33
184-
#define AXP803_DCDC6_1120mV_STEPS 14
184+
#define AXP803_DCDC6_1120mV_STEPS 20
185185
#define AXP803_DCDC6_1120mV_END \
186186
(AXP803_DCDC6_1120mV_START + AXP803_DCDC6_1120mV_STEPS)
187187
#define AXP803_DCDC6_NUM_VOLTAGES 72
@@ -240,7 +240,7 @@
240240
#define AXP806_DCDCA_600mV_END \
241241
(AXP806_DCDCA_600mV_START + AXP806_DCDCA_600mV_STEPS)
242242
#define AXP806_DCDCA_1120mV_START 0x33
243-
#define AXP806_DCDCA_1120mV_STEPS 14
243+
#define AXP806_DCDCA_1120mV_STEPS 20
244244
#define AXP806_DCDCA_1120mV_END \
245245
(AXP806_DCDCA_1120mV_START + AXP806_DCDCA_1120mV_STEPS)
246246
#define AXP806_DCDCA_NUM_VOLTAGES 72
@@ -774,8 +774,8 @@ static const struct regulator_linear_range axp806_dcdcd_ranges[] = {
774774
AXP806_DCDCD_600mV_END,
775775
20000),
776776
REGULATOR_LINEAR_RANGE(1600000,
777-
AXP806_DCDCD_600mV_START,
778-
AXP806_DCDCD_600mV_END,
777+
AXP806_DCDCD_1600mV_START,
778+
AXP806_DCDCD_1600mV_END,
779779
100000),
780780
};
781781

drivers/regulator/lp87565-regulator.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
163163
struct lp87565 *lp87565 = dev_get_drvdata(pdev->dev.parent);
164164
struct regulator_config config = { };
165165
struct regulator_dev *rdev;
166-
int i, min_idx = LP87565_BUCK_0, max_idx = LP87565_BUCK_3;
166+
int i, min_idx, max_idx;
167167

168168
platform_set_drvdata(pdev, lp87565);
169169

@@ -182,9 +182,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
182182
max_idx = LP87565_BUCK_3210;
183183
break;
184184
default:
185-
dev_err(lp87565->dev, "Invalid lp config %d\n",
186-
lp87565->dev_type);
187-
return -EINVAL;
185+
min_idx = LP87565_BUCK_0;
186+
max_idx = LP87565_BUCK_3;
187+
break;
188188
}
189189

190190
for (i = min_idx; i <= max_idx; i++) {

drivers/regulator/of_regulator.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,10 @@ device_node *regulator_of_get_init_node(struct device *dev,
416416
if (!name)
417417
name = child->name;
418418

419-
if (!strcmp(desc->of_match, name))
419+
if (!strcmp(desc->of_match, name)) {
420+
of_node_put(search);
420421
return of_node_get(child);
422+
}
421423
}
422424

423425
of_node_put(search);

0 commit comments

Comments
 (0)