[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250209203940.159088-1-david@ixit.cz>
Date: Sun, 9 Feb 2025 21:39:25 +0100
From: David Heidelberg <david@...t.cz>
To: Pavel Machek <pavel@....cz>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
David Heidelberg <david@...t.cz>
Cc: linux-media@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] media: dt-bindings: Convert Analog Devices ad5820 to DT schema
Convert the Analog Devices ad5820 to DT schema format.
Signed-off-by: David Heidelberg <david@...t.cz>
---
Needs: media: dt-bindings: media: i2c: align filenames format with standard
.../bindings/media/i2c/adi,ad5820.txt | 28 ---------
.../bindings/media/i2c/adi,ad5820.yaml | 62 +++++++++++++++++++
2 files changed, 62 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/media/i2c/adi,ad5820.txt
create mode 100644 Documentation/devicetree/bindings/media/i2c/adi,ad5820.yaml
diff --git a/Documentation/devicetree/bindings/media/i2c/adi,ad5820.txt b/Documentation/devicetree/bindings/media/i2c/adi,ad5820.txt
deleted file mode 100644
index 5764cbedf9b73..0000000000000
--- a/Documentation/devicetree/bindings/media/i2c/adi,ad5820.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-* Analog Devices AD5820 autofocus coil
-
-Required Properties:
-
- - compatible: Must contain one of:
- - "adi,ad5820"
- - "adi,ad5821"
- - "adi,ad5823"
-
- - reg: I2C slave address
-
- - VANA-supply: supply of voltage for VANA pin
-
-Optional properties:
-
- - enable-gpios : GPIO spec for the XSHUTDOWN pin. The XSHUTDOWN signal is
-active low, a high level on the pin enables the device.
-
-Example:
-
- ad5820: coil@c {
- compatible = "adi,ad5820";
- reg = <0x0c>;
-
- VANA-supply = <&vaux4>;
- enable-gpios = <&msmgpio 26 GPIO_ACTIVE_HIGH>;
- };
-
diff --git a/Documentation/devicetree/bindings/media/i2c/adi,ad5820.yaml b/Documentation/devicetree/bindings/media/i2c/adi,ad5820.yaml
new file mode 100644
index 0000000000000..5a403cbc07317
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/adi,ad5820.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/adi,ad5820.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5820 autofocus coil
+
+maintainers:
+ - Pavel Machek <pavel@....cz>
+
+description:
+ The AD5820 is a current sink driver designed for precise control of
+ voice coil motors (VCMs) in camera autofocus systems.
+
+properties:
+ compatible:
+ enum:
+ - adi,ad5820
+ - adi,ad5821
+ - adi,ad5823
+
+ reg:
+ maxItems: 1
+
+ enable-gpios:
+ maxItems: 1
+ description:
+ GPIO spec for the XSHUTDOWN pin. The XSHUTDOWN signal is active low,
+ a high level on the pin enables the device.
+
+ VANA-supply:
+ description: supply of voltage for VANA pin
+
+ "#io-channel-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - VANA-supply
+ - '#io-channel-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ coil@c {
+ compatible = "adi,ad5820";
+ reg = <0x0c>;
+
+ enable-gpios = <&msmgpio 26 GPIO_ACTIVE_HIGH>;
+ VANA-supply = <&vaux4>;
+
+ #io-channel-cells = <0>;
+ };
+ };
--
2.47.2
Powered by blists - more mailing lists