diff mbox series

[V1,1/3] ASoC: dt-bindings: Add schema for "awinic,aw87390"

Message ID 20230904114621.4457-2-wangweidong.a@awinic.com (mailing list archive)
State Superseded
Headers show
Series ASoC: codecs: Add aw87390 amplifier driver | expand

Commit Message

wangweidong.a@awinic.com Sept. 4, 2023, 11:46 a.m. UTC
From: Weidong Wang <wangweidong.a@awinic.com>

Add a DT schema for describing awinic aw87390 audio amplifiers.
They are controlled using I2C.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 .../bindings/sound/awinic,aw87390.yaml        | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/awinic,aw87390.yaml

Comments

Krzysztof Kozlowski Sept. 4, 2023, 12:14 p.m. UTC | #1
On 04/09/2023 13:46, wangweidong.a@awinic.com wrote:
> From: Weidong Wang <wangweidong.a@awinic.com>
> 
> Add a DT schema for describing awinic aw87390 audio amplifiers.
> They are controlled using I2C.

Thank you for your patch. There is something to discuss/improve.


> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: awinic,aw87390
> +
> +  reg:
> +    maxItems: 1

No reset-gpios? Shouldn't this be just merged with awinic,aw88395 bindings?

Missing sound-dai-cells (const: 0 or 1)

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        audio-codec@58 {
> +            compatible = "awinic,aw87390";
> +            reg = <0x58>;

Please add sound-dai-cells for the example to be complete.

Best regards,
Krzysztof
wangweidong.a@awinic.com Sept. 5, 2023, 3:31 a.m. UTC | #2
Thank you very much for your review. 
I would like to discuss something with you

On 04/09/2023 12:14, krzysztof.kozlowski@linaro.org wrote:
> On 04/09/2023 13:46, wangweidong.a@awinic.com wrote:
>> From: Weidong Wang <wangweidong.a@awinic.com>
>> 
>> Add a DT schema for describing awinic aw87390 audio amplifiers.
>> They are controlled using I2C.

> Thank you for your patch. There is something to discuss/improve.

>> +
>> +allOf:
>> +  - $ref: dai-common.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    const: awinic,aw87390
>> +
>> +  reg:
>> +    maxItems: 1

> No reset-gpios? Shouldn't this be just merged with awinic,aw88395 bindings?

Yes, this chip does not have reset-gpios, and the i2c address of 
this chip is different from the aw88395 chip.So I didn't 
merge it with awinic, aw88395.

> Missing sound-dai-cells (const: 0 or 1)

Thank you very much. I'll add #sound-dai-cells

>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    i2c {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +        audio-codec@58 {
>> +            compatible = "awinic,aw87390";
>> +            reg = <0x58>;

> Please add sound-dai-cells for the example to be complete.

Thank you very much, I will modify it in patch v2

Best regards,
Weidong Wang
Krzysztof Kozlowski Sept. 5, 2023, 6:33 a.m. UTC | #3
On 05/09/2023 05:31, wangweidong.a@awinic.com wrote:
>>> +examples:
>>> +  - |
>>> +    i2c {
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>> +        audio-codec@58 {
>>> +            compatible = "awinic,aw87390";
>>> +            reg = <0x58>;
> 
>> Please add sound-dai-cells for the example to be complete.
> 
> Thank you very much, I will modify it in patch v2

I expect in example all properties your device can use. Not only some
subset you want to add just to satisfy my comment above.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/awinic,aw87390.yaml b/Documentation/devicetree/bindings/sound/awinic,aw87390.yaml
new file mode 100644
index 000000000000..b4de99c9830e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/awinic,aw87390.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/awinic,aw87390.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic Aw87390 Audio Amplifier
+
+maintainers:
+  - Weidong Wang <wangweidong.a@awinic.com>
+
+description:
+  The awinic aw87390 is specifically designed to improve
+  the musical output dynamic range, enhance the overall
+  sound quallity, which is a new high efficiency, low
+  noise, constant large volume, 6th Smart K audio amplifier.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: awinic,aw87390
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        audio-codec@58 {
+            compatible = "awinic,aw87390";
+            reg = <0x58>;
+        };
+    };