Skip to content

Commit 24bd2af

Browse files
committed
Merge branch 'regulator-5.7' into regulator-next
2 parents bae4cb9 + 86332c3 commit 24bd2af

21 files changed

+834
-45
lines changed

Documentation/devicetree/bindings/mfd/qcom-rpm.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Regulator nodes are identified by their compatible:
6161
"qcom,rpm-pm8901-regulators"
6262
"qcom,rpm-pm8921-regulators"
6363
"qcom,rpm-pm8018-regulators"
64+
"qcom,rpm-smb208-regulators"
6465

6566
- vdd_l0_l1_lvs-supply:
6667
- vdd_l2_l11_l12-supply:
@@ -171,6 +172,9 @@ pm8018:
171172
s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
172173
l12, l14, lvs1
173174

175+
smb208:
176+
s1a, s1b, s2a, s2b
177+
174178
The content of each sub-node is defined by the standard binding for regulators -
175179
see regulator.txt - with additional custom properties described below:
176180

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Monolithic Power Systems MP8867/MP8869 voltage regulator
2+
3+
Required properties:
4+
- compatible: Must be one of the following.
5+
"mps,mp8867"
6+
"mps,mp8869"
7+
- reg: I2C slave address.
8+
- enable-gpios: enable gpios.
9+
- mps,fb-voltage-divider: An array of two integers containing the resistor
10+
values R1 and R2 of the feedback voltage divider in kilo ohms.
11+
12+
Any property defined as part of the core regulator binding, defined in
13+
./regulator.txt, can also be used.
14+
15+
Example:
16+
17+
vcpu: regulator@62 {
18+
compatible = "mps,mp8869";
19+
regulator-name = "vcpu";
20+
regulator-min-microvolt = <700000>;
21+
regulator-max-microvolt = <850000>;
22+
regulator-always-on;
23+
regulator-boot-on;
24+
enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
25+
mps,fb-voltage-divider = <80 240>;
26+
reg = <0x62>;
27+
};
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mps,mp5416.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Monolithic Power System MP5416 PMIC
8+
9+
maintainers:
10+
- Saravanan Sekar <[email protected]>
11+
12+
properties:
13+
$nodename:
14+
pattern: "^pmic@[0-9a-f]{1,2}$"
15+
compatible:
16+
enum:
17+
- mps,mp5416
18+
19+
reg:
20+
maxItems: 1
21+
22+
regulators:
23+
type: object
24+
description: |
25+
list of regulators provided by this controller, must be named
26+
after their hardware counterparts BUCK[1-4] and LDO[1-4]
27+
28+
patternProperties:
29+
"^buck[1-4]$":
30+
allOf:
31+
- $ref: "regulator.yaml#"
32+
type: object
33+
34+
"^ldo[1-4]$":
35+
allOf:
36+
- $ref: "regulator.yaml#"
37+
type: object
38+
39+
additionalProperties: false
40+
additionalProperties: false
41+
42+
required:
43+
- compatible
44+
- reg
45+
- regulators
46+
47+
additionalProperties: false
48+
49+
examples:
50+
- |
51+
i2c {
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
55+
pmic@69 {
56+
compatible = "mps,mp5416";
57+
reg = <0x69>;
58+
59+
regulators {
60+
61+
buck1 {
62+
regulator-name = "buck1";
63+
regulator-min-microvolt = <600000>;
64+
regulator-max-microvolt = <2187500>;
65+
regulator-min-microamp = <3800000>;
66+
regulator-max-microamp = <6800000>;
67+
regulator-boot-on;
68+
};
69+
70+
ldo2 {
71+
regulator-name = "ldo2";
72+
regulator-min-microvolt = <800000>;
73+
regulator-max-microvolt = <3975000>;
74+
};
75+
};
76+
};
77+
};
78+
...

Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Regulator nodes are identified by their compatible:
2626
"qcom,rpm-pm8994-regulators"
2727
"qcom,rpm-pm8998-regulators"
2828
"qcom,rpm-pma8084-regulators"
29+
"qcom,rpm-pmi8994-regulators"
2930
"qcom,rpm-pmi8998-regulators"
3031
"qcom,rpm-pms405-regulators"
3132

@@ -143,6 +144,15 @@ Regulator nodes are identified by their compatible:
143144
Definition: reference to regulator supplying the input pin, as
144145
described in the data sheet
145146

147+
- vdd_s1-supply:
148+
- vdd_s2-supply:
149+
- vdd_s3-supply:
150+
- vdd_bst_byp-supply:
151+
Usage: optional (pmi8994 only)
152+
Value type: <phandle>
153+
Definition: reference to regulator supplying the input pin, as
154+
described in the data sheet
155+
146156
- vdd_s1-supply:
147157
- vdd_s2-supply:
148158
- vdd_s3-supply:
@@ -259,6 +269,9 @@ pma8084:
259269
l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20,
260270
l21, l22, l23, l24, l25, l26, l27, lvs1, lvs2, lvs3, lvs4, 5vs1
261271

272+
pmi8994:
273+
s1, s2, s3, boost-bypass
274+
262275
pmi8998:
263276
bob
264277

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/vqmmc-ipq4019-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm IPQ4019 VQMMC SD LDO regulator
8+
9+
maintainers:
10+
- Robert Marko <[email protected]>
11+
12+
description: |
13+
Qualcomm IPQ4019 SoC-s feature a built a build SD/EMMC controller,
14+
in order to support both 1.8 and 3V I/O voltage levels an LDO
15+
controller is also embedded.
16+
17+
allOf:
18+
- $ref: "regulator.yaml#"
19+
20+
properties:
21+
compatible:
22+
const: qcom,vqmmc-ipq4019-regulator
23+
24+
reg:
25+
maxItems: 1
26+
27+
required:
28+
- compatible
29+
- reg
30+
31+
examples:
32+
- |
33+
regulator@1948000 {
34+
compatible = "qcom,vqmmc-ipq4019-regulator";
35+
reg = <0x01948000 0x4>;
36+
regulator-name = "vqmmc";
37+
regulator-min-microvolt = <1500000>;
38+
regulator-max-microvolt = <3000000>;
39+
regulator-always-on;
40+
status = "disabled";
41+
};
42+
...

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11256,7 +11256,8 @@ F: drivers/tty/mxser.*
1125611256
MONOLITHIC POWER SYSTEM PMIC DRIVER
1125711257
M: Saravanan Sekar <[email protected]>
1125811258
S: Maintained
11259-
F: Documentation/devicetree/bindings/regulator/mpq7920.yaml
11259+
F: Documentation/devicetree/bindings/regulator/mps,mp*.yaml
11260+
F: drivers/regulator/mp5416.c
1126011261
F: drivers/regulator/mpq7920.c
1126111262
F: drivers/regulator/mpq7920.h
1126211263

drivers/regulator/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ config REGULATOR_AD5398
107107

108108
config REGULATOR_ANATOP
109109
tristate "Freescale i.MX on-chip ANATOP LDO regulators"
110+
depends on ARCH_MXC || COMPILE_TEST
110111
depends on MFD_SYSCON
111112
help
112113
Say y here to support Freescale i.MX on-chip ANATOP LDOs
@@ -613,6 +614,16 @@ config REGULATOR_MCP16502
613614
through the regulator interface. In addition it enables
614615
suspend-to-ram/standby transition.
615616

617+
config REGULATOR_MP5416
618+
tristate "Monolithic MP5416 PMIC"
619+
depends on I2C && OF
620+
select REGMAP_I2C
621+
help
622+
Say y here to support the MP5416 PMIC. This will enable supports
623+
the software controllable 4 buck and 4 LDO regulators.
624+
Say M here if you want to include support for the regulator as a
625+
module.
626+
616627
config REGULATOR_MP8859
617628
tristate "MPS MP8859 regulator driver"
618629
depends on I2C
@@ -624,6 +635,13 @@ config REGULATOR_MP8859
624635
Say M here if you want to include support for the regulator as a
625636
module. The module will be named "mp8859".
626637

638+
config REGULATOR_MP886X
639+
tristate "MPS MP8869 regulator driver"
640+
depends on I2C && (OF || COMPILE_TEST)
641+
select REGMAP_I2C
642+
help
643+
This driver supports the MP8869 voltage regulator.
644+
627645
config REGULATOR_MPQ7920
628646
tristate "Monolithic MPQ7920 PMIC"
629647
depends on I2C && OF

drivers/regulator/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
7878
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
7979
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
8080
obj-$(CONFIG_REGULATOR_MCP16502) += mcp16502.o
81+
obj-$(CONFIG_REGULATOR_MP5416) += mp5416.o
8182
obj-$(CONFIG_REGULATOR_MP8859) += mp8859.o
83+
obj-$(CONFIG_REGULATOR_MP886X) += mp886x.o
8284
obj-$(CONFIG_REGULATOR_MPQ7920) += mpq7920.o
8385
obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o
8486
obj-$(CONFIG_REGULATOR_MT6323) += mt6323-regulator.o

drivers/regulator/anatop-regulator.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,13 @@ static int anatop_regulator_probe(struct platform_device *pdev)
305305
/* register regulator */
306306
rdev = devm_regulator_register(dev, rdesc, &config);
307307
if (IS_ERR(rdev)) {
308-
dev_err(dev, "failed to register %s\n",
309-
rdesc->name);
310-
return PTR_ERR(rdev);
308+
ret = PTR_ERR(rdev);
309+
if (ret == -EPROBE_DEFER)
310+
dev_dbg(dev, "failed to register %s, deferring...\n",
311+
rdesc->name);
312+
else
313+
dev_err(dev, "failed to register %s\n", rdesc->name);
314+
return ret;
311315
}
312316

313317
platform_set_drvdata(pdev, rdev);

drivers/regulator/axp20x-regulator.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ static int axp20x_set_ramp_delay(struct regulator_dev *rdev, int ramp)
381381
mask = AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_RATE_MASK |
382382
AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_EN_MASK;
383383
enable = (ramp > 0) ?
384-
AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_EN :
385-
!AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_EN;
384+
AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_EN : 0;
386385
break;
387386
}
388387

@@ -393,8 +392,7 @@ static int axp20x_set_ramp_delay(struct regulator_dev *rdev, int ramp)
393392
mask = AXP20X_DCDC2_LDO3_V_RAMP_LDO3_RATE_MASK |
394393
AXP20X_DCDC2_LDO3_V_RAMP_LDO3_EN_MASK;
395394
enable = (ramp > 0) ?
396-
AXP20X_DCDC2_LDO3_V_RAMP_LDO3_EN :
397-
!AXP20X_DCDC2_LDO3_V_RAMP_LDO3_EN;
395+
AXP20X_DCDC2_LDO3_V_RAMP_LDO3_EN : 0;
398396
break;
399397
}
400398

0 commit comments

Comments
 (0)