Re: [PATCH] dt-bindings: regulator: lltc,ltc3676: convert to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/16/24 9:24 AM, Krzysztof Kozlowski wrote:
On Wed, Oct 16, 2024 at 12:42:51AM +0200, Marek Vasut wrote:
Convert Linear Technology LTC3676 8-output I2C voltage regulator IC
DT bindings to YAML DT. Add missing interrupts: property as this IC
does have interrupt line and it is used in existing DTs.

Signed-off-by: Marek Vasut <marex@xxxxxxx>
---
Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: Tim Harvey <tharvey@xxxxxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: kernel@xxxxxxxxxxxxxxxxxx
---
  .../bindings/regulator/lltc,ltc3676.yaml      | 171 ++++++++++++++++++
  .../devicetree/bindings/regulator/ltc3676.txt |  94 ----------
  2 files changed, 171 insertions(+), 94 deletions(-)
  create mode 100644 Documentation/devicetree/bindings/regulator/lltc,ltc3676.yaml
  delete mode 100644 Documentation/devicetree/bindings/regulator/ltc3676.txt

diff --git a/Documentation/devicetree/bindings/regulator/lltc,ltc3676.yaml b/Documentation/devicetree/bindings/regulator/lltc,ltc3676.yaml
new file mode 100644
index 0000000000000..ec9ce856a944d
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lltc,ltc3676.yaml
@@ -0,0 +1,171 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/lltc,ltc3676.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Linear Technology LTC3676 8-output regulators
+
+maintainers:
+  - Tim Harvey <tharvey@xxxxxxxxxxxxx>
+
+description: |
+  LTC3676 contains eight regulators, 4 switching SW1..SW4 and four LDO1..4 .
+
+properties:
+  compatible:
+    const: lltc,ltc3676
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    type: object

Move the additionalProperties:false here.

+    description: |
+      List of regulators provided by this controller, must be named
+      after their hardware counterparts (SW|LDO)[1-4].
+
+    patternProperties:
+      "^(sw[1-4]|ldo[24])$":
+        type: object
+        $ref: regulator.yaml#

Move the unevaluatedProperties here, ditto in other places.
Fixed in V2.

I wanted to ask though, there are these patternProperties here which cover sw1..4 and ldo2 and ldo4, and then there is dedicated special case for ldo1 (because this LDO node must always contain regulator-always-on property) and ldo3 (because this LDO node must NOT contain lltc,fb-voltage-divider property). Is there any way to place all the sw1..4 and ldo1..4 into patternProperties, and then selectively DISABLE lltc,fb-voltage-divider requirement for LDO3 and ENABLE regulator-always-on for LDO1 ? I was looking at allOf:if: , but couldn't find anything.

Thanks !




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux