Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220425072455.27356-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
a498db69 062920d2

+13 -1
+13 -1
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
··· 32 32 If only one gpio is specified, only one gpio used to control ENP/ENM. 33 33 Else if both are specified, DSVP/DSVN could be controlled individually. 34 34 If this property not specified, treat both as always-on regulators. 35 + 36 + Property is deprecated. Use enable-gpios in each regulator. 35 37 minItems: 1 36 38 maxItems: 2 39 + deprecated: true 37 40 38 41 patternProperties: 39 42 "^DSV(P|N)$": ··· 44 41 $ref: regulator.yaml# 45 42 description: 46 43 Properties for single display bias regulator. 44 + 45 + properties: 46 + enable-gpios: 47 + description: 48 + GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured 49 + for controlling both regulators. If this property not specified for 50 + any regulator, treat both as always-on regulators. 51 + maxItems: 1 47 52 48 53 required: 49 54 - compatible ··· 68 57 rt4801@73 { 69 58 compatible = "richtek,rt4801"; 70 59 reg = <0x73>; 71 - enable-gpios = <&gpio26 2 0>, <&gpio26 3 0>; 72 60 73 61 dsvp: DSVP { 74 62 regulator-name = "rt4801,dsvp"; 75 63 regulator-min-microvolt = <4000000>; 76 64 regulator-max-microvolt = <6000000>; 77 65 regulator-boot-on; 66 + enable-gpios = <&gpio26 2 0>; 78 67 }; 79 68 dsvn: DSVN { 80 69 regulator-name = "rt4801,dsvn"; 81 70 regulator-min-microvolt = <4000000>; 82 71 regulator-max-microvolt = <6000000>; 83 72 regulator-boot-on; 73 + enable-gpios = <&gpio26 3 0>; 84 74 }; 85 75 86 76 };