[PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document

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

 



From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

Binding is a little stricter than the Linux driver.

It requires vcc-supply to be present for devices that don't have
an internal reference, whereas the driver just prints a message and
carries on.  Given this means that it is impossible to establish
a scaling of the output channel, let us make it required in the binding
schema.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
---
 .../bindings/iio/dac/adi,ad5446.yaml          | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
new file mode 100644
index 000000000000..e0a0def20c8c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5446.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Single channel DACs similar to the AD5446
+
+maintainers:
+  - Lars-Peter Clausen <lars@xxxxxxxxxx>
+  - Jonathan Cameron <jic23@xxxxxxxxxx>
+
+properties:
+  compatible:
+    oneOf:
+      - description: I2C devices
+        enum:
+          - adi,ad5602
+          - adi,ad5612
+          - adi,ad5622
+      - description: SPI devices
+        enum:
+          - adi,ad5300
+          - adi,ad5310
+          - adi,ad5320
+          - adi,ad5444
+          - adi,ad5446
+          - adi,ad5450
+          - adi,ad5451
+          - adi,ad5452
+          - adi,ad5453
+          - adi,ad5512a
+          - adi,ad5541a
+          - adi,ad5542a
+          - adi,ad5543
+          - adi,ad5553
+          - adi,ad5600
+          - adi,ad5601
+          - adi,ad5611
+          - adi,ad5621
+          - adi,ad5641
+          - adi,ad5620-2500
+          - adi,ad5620-1250
+          - adi,ad5640-2500
+          - adi,ad5640-1250
+          - adi,ad5660-2500
+          - adi,ad5660-1250
+          - adi,ad5662
+          - ti,dac081s101
+          - ti,dac101s101
+          - ti,dac121s101
+          - ti,dac7512
+
+  reg:
+    maxItems: 1
+
+  vcc-supply: true
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+# Ensure the scaling can be established for devices with no internal reference.
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - adi,ad5620-2500
+                - adi,ad5620-1250
+                - adi,ad5640-2500
+                - adi,ad5640-1250
+                - adi,ad5660-2500
+                - adi,ad5660-1250
+    then:
+      required:
+        - vcc-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5620-2500";
+        };
+    };
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@42 {
+            reg = <0x42>;
+            compatible = "adi,ad5602";
+            vcc-supply = <&vcc_dac>;
+        };
+    };
+...
-- 
2.32.0




[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