diff options
author | Tomas Novotny | 2020-12-16 11:13:16 +0100 |
---|---|---|
committer | Jonathan Cameron | 2021-01-09 21:52:47 +0000 |
commit | a363bfb986baf9f097c54f03def6a988d7b05ec8 (patch) | |
tree | fd5ea041ffa122590d713ddd708d4e62b20d3a00 /Documentation | |
parent | 28e37a92e30751dd16ffbbccdf36bf15d6a64152 (diff) |
dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726
The vdd-supply property is optional if vref-supply is provided for
mcp4726.
Also the microchip,vref-buffered makes sense only if vref-supply is
specified.
Spotted by Jonathan during conversion to yaml.
Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201216101316.1403-1-tomas@novotny.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml index 271998610ceb..5f5b578316bc 100644 --- a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml @@ -39,20 +39,39 @@ properties: allOf: - if: - not: - properties: - compatible: - contains: - const: microchip,mcp4726 + properties: + compatible: + contains: + const: microchip,mcp4725 then: properties: vref-supply: false + required: + - vdd-supply + + - if: + properties: + compatible: + contains: + const: microchip,mcp4726 + then: + anyOf: + - required: + - vdd-supply + - required: + - vref-supply + + - if: + not: + required: + - vref-supply + then: + properties: microchip,vref-buffered: false required: - compatible - reg - - vdd-supply additionalProperties: false |