summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/iio/potentiometer
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-10-31 18:48:10 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-11-22 16:38:39 +0000
commit05c6330c4347bbaab75a2f362768180502bc32c2 (patch)
tree5ba185856e269ee419034aba0e0130693bb6ef51 /Documentation/devicetree/bindings/iio/potentiometer
parent9a7dc81714c5eeb9bc6ab2b73c4389adacffb1da (diff)
downloadlinux-05c6330c4347bbaab75a2f362768180502bc32c2.tar.bz2
dt-bindings:iio:potentiometer:adi,ad5272 yaml conversion
Simple direct conversion from txt to yaml as part of a general aim of converting all IIO bindings to this machine readable format. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Phil Reid <preid@electromag.com.au> Cc: Phil Reid <preid@electromag.com.au> Link: https://lore.kernel.org/r/20201031184854.745828-3-jic23@kernel.org
Diffstat (limited to 'Documentation/devicetree/bindings/iio/potentiometer')
-rw-r--r--Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt27
-rw-r--r--Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml50
2 files changed, 50 insertions, 27 deletions
diff --git a/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt b/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt
deleted file mode 100644
index f9b2eef946aa..000000000000
--- a/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* Analog Devices AD5272 digital potentiometer
-
-The node for this device must be a child node of a I2C controller, hence
-all mandatory properties for your controller must be specified. See directory:
-
- Documentation/devicetree/bindings/i2c
-
-for more details.
-
-Required properties:
- - compatible: Must be one of the following, depending on the model:
- adi,ad5272-020
- adi,ad5272-050
- adi,ad5272-100
- adi,ad5274-020
- adi,ad5274-100
-
-Optional properties:
- - reset-gpios: GPIO specification for the RESET input. This is an
- active low signal to the AD5272.
-
-Example:
-ad5272: potentiometer@2f {
- reg = <0x2F>;
- compatible = "adi,ad5272-020";
- reset-gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;
-};
diff --git a/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml
new file mode 100644
index 000000000000..1aee9f9be951
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/potentiometer/adi,ad5272.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5272 digital potentiometer
+
+maintainers:
+ - Phil Reid <preid@electromag.com.au>
+
+description: |
+ Datasheet: https://www.analog.com/en/products/ad5272.html
+
+properties:
+ compatible:
+ enum:
+ - adi,ad5272-020
+ - adi,ad5272-050
+ - adi,ad5272-100
+ - adi,ad5274-020
+ - adi,ad5274-100
+
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ description:
+ Active low signal to the AD5272 RESET input.
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ potentiometer@2f {
+ compatible = "adi,ad5272-020";
+ reg = <0x2F>;
+ reset-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
+ };
+ };
+...