Skip to content

Commit a498db6

Browse files
krzkbroonie
authored andcommitted
regulator: dt-bindings: richtek,rt4801: use existing ena_gpiod feature
The binding and driver duplicated regulator core feature of controlling regulators with GPIOs (of_parse_cb + ena_gpiod) and created its own enable-gpios property with multiple GPIOs. This is a less preferred way, because enable-gpios should enable only one element, not multiple. It also duplicates existing solution. Deprecate the original 'enable-gpios' and add per-regulator property. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 062920d commit a498db6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ properties:
3232
If only one gpio is specified, only one gpio used to control ENP/ENM.
3333
Else if both are specified, DSVP/DSVN could be controlled individually.
3434
If this property not specified, treat both as always-on regulators.
35+
36+
Property is deprecated. Use enable-gpios in each regulator.
3537
minItems: 1
3638
maxItems: 2
39+
deprecated: true
3740

3841
patternProperties:
3942
"^DSV(P|N)$":
@@ -42,6 +45,14 @@ patternProperties:
4245
description:
4346
Properties for single display bias regulator.
4447

48+
properties:
49+
enable-gpios:
50+
description:
51+
GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured
52+
for controlling both regulators. If this property not specified for
53+
any regulator, treat both as always-on regulators.
54+
maxItems: 1
55+
4556
required:
4657
- compatible
4758
- reg
@@ -57,19 +68,20 @@ examples:
5768
rt4801@73 {
5869
compatible = "richtek,rt4801";
5970
reg = <0x73>;
60-
enable-gpios = <&gpio26 2 0>, <&gpio26 3 0>;
6171
6272
dsvp: DSVP {
6373
regulator-name = "rt4801,dsvp";
6474
regulator-min-microvolt = <4000000>;
6575
regulator-max-microvolt = <6000000>;
6676
regulator-boot-on;
77+
enable-gpios = <&gpio26 2 0>;
6778
};
6879
dsvn: DSVN {
6980
regulator-name = "rt4801,dsvn";
7081
regulator-min-microvolt = <4000000>;
7182
regulator-max-microvolt = <6000000>;
7283
regulator-boot-on;
84+
enable-gpios = <&gpio26 3 0>;
7385
};
7486
7587
};

0 commit comments

Comments
 (0)