Skip to contentSkip to conversation

ASoC: dt-bindings: ak4458: Convert to dtschema

PATCH Superseded Saalim Quadri 2 participants 3 messages Mar 28, 2023

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ASoC: dt-bindings: ak4458: Convert to dtschema

Convert the AK4458 audio DAC bindings to DT schema.

---
Changes:
V1 -> V2: Use the correct way for dsd-path property
Drop ak4458 label form example
V2 -> V3: ak4458 is the only one that does not support dsd-path, so we
do not require to define an array
V3 -> V4: Add back dsd-path property description

 .../devicetree/bindings/sound/ak4458.txt      | 28 -------
 .../bindings/sound/asahi-kasei,ak4458.yaml    | 73 +++++++++++++++++++
 2 files changed, 73 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ak4458.txt
 create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
Documentation/devicetree/bindings/sound/ak4458.txt deleted +0 -28
deleted file mode 100644
index 0416c14895d6..000000000000
@@ -1,28 +0,0 @@
-AK4458 audio DAC
-
-This device supports I2C mode.
-
-Required properties:
-
-- compatible : "asahi-kasei,ak4458" or "asahi-kasei,ak4497"
-- reg : The I2C address of the device for I2C
-
-Optional properties:
-- reset-gpios: A GPIO specifier for the power down & reset pin
-- mute-gpios: A GPIO specifier for the soft mute pin
-- AVDD-supply: Analog power supply
-- DVDD-supply: Digital power supply
-- dsd-path: Select DSD input pins for ak4497
-            0: select #16, #17, #19 pins
-            1: select #3, #4, #5 pins
-
-Example:
-
-&i2c {
-	ak4458: dac@10 {
-		compatible = "asahi-kasei,ak4458";
-		reg = <0x10>;
-		reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>
-		mute-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>
-	};
-};
Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v4 1/1
#1 lore raw
Quoted 3 lines · Saalim Quadri

Convert the AK4458 audio DAC bindings to DT schema.

(...)

Quoted 20 lines
Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml new file +20 -0
+  dvdd-supply:
+    description: Digital power supply
+
+  reset-gpios:
+    maxItems: 1
+
+  mute-gpios:
+    maxItems: 1
+    description:
+      GPIO used to mute all the outputs
+
+  dsd-path:
+    description: Select DSD input pins for ak4497
+    $ref: /schemas/types.yaml#/definitions/uint32
+    oneOf:
+      - const: 0
+        description: select #16, #17, #19 pins
+      - const: 1
+        description: select #3, #4, #5 pins
+

Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml line 53

Quoted 10 lines
Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml new file +10 -0
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: asahi-kasei,ak4458
+
+    then:
+      properties:
+        dsd-path: false

When I commented on adding allOf, I did it in specific place - after required before additionalProperties. You decided to put it in different place, not the one I asked. Also not the place example-schema is suggesting. The placement of people comments in emails is important. We answer here always inline, thus comments apply in the place they are given.

Best regards,
Krzysztof

#2 lore raw

I apologise, I will keep this in mind from now on and will avoid it in future. I will send the finaly patch, fixing the schema format.

Apologies,

Saalim