Convert the Asahi Kasei AK5386 ADC binding from text format
to YAML schema.
Signed-off-by: Manish Baing <manishbaing2789@gmail.com>
---
Changes in v2:
- Added dai-common.yaml reference and #sound-dai-cells to support
generic sound card DAI links.
- Changed additionalProperties to unevaluatedProperties: false.
- Restored legacy reset-gpio property as deprecated to maintain DT ABI
backward compatibility.
.../devicetree/bindings/sound/ak5386.txt | 23 --------
.../bindings/sound/asahi-kasei,ak5386.yaml | 56 +++++++++++++++++++
2 files changed, 56 insertions(+), 23 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/ak5386.txt
create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
diff --git a/Documentation/devicetree/bindings/sound/ak5386.txt b/Documentation/devicetree/bindings/sound/ak5386.txt
deleted file mode 100644
index ec3df3abba0c..000000000000
--- a/Documentation/devicetree/bindings/sound/ak5386.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-AK5386 Single-ended 24-Bit 192kHz delta-sigma ADC
-
-This device has no control interface.
-
-Required properties:
-
- - compatible : "asahi-kasei,ak5386"
-
-Optional properties:
-
- - reset-gpio : a GPIO spec for the reset/power down pin.
- If specified, it will be deasserted at probe time.
- - va-supply : a regulator spec, providing 5.0V
- - vd-supply : a regulator spec, providing 3.3V
-
-Example:
-
-spdif: ak5386@0 {
- compatible = "asahi-kasei,ak5386";
- reset-gpio = <&gpio0 23>;
- va-supply = <&vdd_5v0_reg>;
- vd-supply = <&vdd_3v3_reg>;
-};
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
new file mode 100644
index 000000000000..8b9b9bdb3609
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5386.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/asahi-kasei,ak5386.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Asahi Kasei AK5386 ADC
+
+maintainers:
+ - Daniel Mack <zonque@gmail.com>
+
+description:
+ The Asahi Kasei AK5386 is a single-ended 24-Bit 192kHz delta-sigma
+ analog-to-digital converter (ADC). This device has no control interface.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: asahi-kasei,ak5386
+
+ "#sound-dai-cells":
+ const: 0
+
+ reset-gpios:
+ maxItems: 1
+ description: A GPIO spec for the reset/power down pin.
+
+ reset-gpio:
+ maxItems: 1
+ deprecated: true
+ description: Legacy property, use reset-gpios instead.
+
+ va-supply:
+ description: Power supply for the analog section.
+
+ vd-supply:
+ description: Power supply for the digital section.
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ adc {
+ compatible = "asahi-kasei,ak5386";
+ #sound-dai-cells = <0>;
+ reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ va-supply = <&vdd_5v0_reg>;
+ vd-supply = <&vdd_3v3_reg>;
+ };
--
2.43.0