devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
@ 2023-05-09  5:10 David Lin
  2023-05-09  6:13 ` Krzysztof Kozlowski
  2023-05-09  6:22 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 9+ messages in thread
From: David Lin @ 2023-05-09  5:10 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux,
	David Lin

Convert the NAU8825 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
---
 .../devicetree/bindings/sound/nau8825.txt     | 111 ---------
 .../bindings/sound/nuvoton,nau8825.yaml       | 220 ++++++++++++++++++
 2 files changed, 220 insertions(+), 111 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
 create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml

diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt
deleted file mode 100644
index a9c34526f4cb..000000000000
--- a/Documentation/devicetree/bindings/sound/nau8825.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-Nuvoton NAU8825 audio codec
-
-This device supports I2C only.
-
-Required properties:
-  - compatible : Must be "nuvoton,nau8825"
-
-  - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1).
-
-Optional properties:
-  - nuvoton,jkdet-enable: Enable jack detection via JKDET pin.
-  - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled,
-      otherwise pin in high impedance state.
-  - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
-  - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.
-
-  - nuvoton,vref-impedance: VREF Impedance selection
-      0 - Open
-      1 - 25 kOhm
-      2 - 125 kOhm
-      3 - 2.5 kOhm
-
-  - nuvoton,micbias-voltage: Micbias voltage level.
-      0 - VDDA
-      1 - VDDA
-      2 - VDDA * 1.1
-      3 - VDDA * 1.2
-      4 - VDDA * 1.3
-      5 - VDDA * 1.4
-      6 - VDDA * 1.53
-      7 - VDDA * 1.53
-
-  - nuvoton,sar-threshold-num: Number of buttons supported
-  - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
-    SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
-    where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
-    Refer datasheet section 10.2 for more information about threshold calculation.
-
-  - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.
-
-  - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
-      0 - VDDA
-      1 - VDDA
-      2 - VDDA * 1.1
-      3 - VDDA * 1.2
-      4 - VDDA * 1.3
-      5 - VDDA * 1.4
-      6 - VDDA * 1.53
-      7 - VDDA * 1.53
-
-  - nuvoton,sar-compare-time: SAR compare time
-      0 - 500 ns
-      1 - 1 us
-      2 - 2 us
-      3 - 4 us
-
-  - nuvoton,sar-sampling-time: SAR sampling time
-      0 - 2 us
-      1 - 4 us
-      2 - 8 us
-      3 - 16 us
-
-  - nuvoton,short-key-debounce: Button short key press debounce time.
-      0 - 30 ms
-      1 - 50 ms
-      2 - 100 ms
-      3 - 30 ms
-
-  - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
-  - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
-
-  - nuvoton,crosstalk-enable: make crosstalk function enable if set.
-
-  - nuvoton,adcout-drive-strong: make the drive strength of ADCOUT IO PIN strong if set.
-      Otherwise, the drive keeps normal strength.
-
-  - nuvoton,adc-delay-ms: Delay (in ms) to make input path stable and avoid pop noise. The
-      default value is 125 and range between 125 to 500 ms.
-
-  - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
-      clocks described in clock-names
-  - clock-names: should include "mclk" for the MCLK master clock
-
-Example:
-
-  headset: nau8825@1a {
-      compatible = "nuvoton,nau8825";
-      reg = <0x1a>;
-      interrupt-parent = <&gpio>;
-      interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
-      nuvoton,jkdet-enable;
-      nuvoton,jkdet-pull-enable;
-      nuvoton,jkdet-pull-up;
-      nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
-      nuvoton,vref-impedance = <2>;
-      nuvoton,micbias-voltage = <6>;
-      // Setup 4 buttons impedance according to Android specification
-      nuvoton,sar-threshold-num = <4>;
-      nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
-      nuvoton,sar-hysteresis = <1>;
-      nuvoton,sar-voltage = <0>;
-      nuvoton,sar-compare-time = <0>;
-      nuvoton,sar-sampling-time = <0>;
-      nuvoton,short-key-debounce = <2>;
-      nuvoton,jack-insert-debounce = <7>;
-      nuvoton,jack-eject-debounce = <7>;
-      nuvoton,crosstalk-enable;
-
-      clock-names = "mclk";
-      clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_2>;
-  };
diff --git a/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml b/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
new file mode 100644
index 000000000000..7938bf6d9190
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
@@ -0,0 +1,220 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nuvoton,nau8825.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NAU8825 audio CODEC
+
+maintainers:
+  - John Hsu <KCHSU0@nuvoton.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,nau8825
+
+  reg:
+    maxItems: 1
+
+  nuvoton,jkdet-enable:
+    description:
+      Enable jack detection via JKDET pin.
+    type: boolean
+
+  nuvoton,jkdet-pull-enable:
+    description:
+      Enable JKDET pin pull.
+      If set - pin pull enabled, otherwise pin in high impedance state.
+    type: boolean
+
+  nuvoton,jkdet-pull-up:
+    description:
+      Pull-up JKDET pin.
+      If set then JKDET pin is pull up, otherwise pull down.
+    type: boolean
+
+  nuvoton,jkdet-polarity:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      JKDET pin polarity.
+    enum:
+      - 0 # active high
+      - 1 # active low
+
+  nuvoton,vref-impedance:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      VREF Impedance selection.
+    enum:
+      - 0 # Open
+      - 1 # 25 kOhm
+      - 2 # 125 kOhm
+      - 3 # 2.5 kOhm
+
+  nuvoton,micbias-voltage:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Micbias voltage level.
+    enum:
+      - 0 # VDDA
+      - 1 # VDDA
+      - 2 # VDDA * 1.1
+      - 3 # VDDA * 1.2
+      - 4 # VDDA * 1.3
+      - 5 # VDDA * 1.4
+      - 6 # VDDA * 1.53
+      - 7 # VDDA * 1.53
+
+  nuvoton,sar-threshold-num:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Number of buttons supported.
+    minimum: 1
+    maximum: 4
+
+  nuvoton,sar-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description:
+      Impedance threshold for each button. Array that contains up to 8 buttons
+      configuration. SAR value is calculated as
+      SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
+      configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
+      'nuvoton,sar-voltage', R - button impedance.
+      Refer datasheet section 10.2 for more information about threshold
+      calculation.
+    minItems: 1
+    maxItems: 4
+    items:
+      minimum: 0
+      maximum: 255
+
+  nuvoton,sar-hysteresis:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Button impedance measurement hysteresis.
+
+  nuvoton,sar-voltage:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Reference voltage for button impedance measurement.
+    enum:
+      - 0 # VDDA
+      - 1 # VDDA
+      - 2 # VDDA * 1.1
+      - 3 # VDDA * 1.2
+      - 4 # VDDA * 1.3
+      - 5 # VDDA * 1.4
+      - 6 # VDDA * 1.53
+      - 7 # VDDA * 1.53
+
+  nuvoton,sar-compare-time:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      SAR compare time.
+    enum:
+      - 0 # 500ns
+      - 1 # 1us
+      - 2 # 2us
+      - 3 # 4us
+
+  nuvoton,sar-sampling-time:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      SAR sampling time.
+    enum:
+      - 0 # 2us
+      - 1 # 4us
+      - 2 # 8us
+      - 3 # 16us
+
+  nuvoton,short-key-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Button short key press debounce time.
+    enum:
+      - 0 # 30 ms
+      - 1 # 50 ms
+      - 2 # 100 ms
+
+  nuvoton,jack-insert-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      number from 0 to 7 that sets debounce time to 2^(n+2) ms.
+
+  nuvoton,jack-eject-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      number from 0 to 7 that sets debounce time to 2^(n+2) ms
+
+  nuvoton,crosstalk-enable:
+    description:
+      make crosstalk function enable if set.
+    type: boolean
+
+  nuvoton,adcout-drive-strong:
+    description:
+      make the drive strength of ADCOUT IO PIN strong if set.
+      Otherwise, the drive keeps normal strength.
+    type: boolean
+
+  nuvoton,adc-delay-ms:
+    description:
+      Delay (in ms) to make input path stable and avoid pop noise.
+      The default value is 125 and range between 125 to 500 ms.
+    minimum: 125
+    maximum: 500
+
+  clocks:
+   description:
+     list of phandle and clock specifier pairs according to common clock
+     bindings for the clocks described in clock-names.
+
+  clock-names:
+   description:
+     should include "mclk" for the MCLK master clock.
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/tegra-gpio.h>
+    #include <dt-bindings/soc/tegra-pmc.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        headset: nau8825@1a {
+            compatible = "nuvoton,nau8825";
+            reg = <0x1a>;
+            interrupt-parent = <&gpio>;
+            interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
+            nuvoton,jkdet-enable;
+            nuvoton,jkdet-pull-enable;
+            nuvoton,jkdet-pull-up;
+            nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
+            nuvoton,vref-impedance = <2>;
+            nuvoton,micbias-voltage = <6>;
+            // Setup 4 buttons impedance according to Android specification
+            nuvoton,sar-threshold-num = <4>;
+            nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
+            nuvoton,sar-hysteresis = <1>;
+            nuvoton,sar-voltage = <0>;
+            nuvoton,sar-compare-time = <0>;
+            nuvoton,sar-sampling-time = <0>;
+            nuvoton,short-key-debounce = <2>;
+            nuvoton,jack-insert-debounce = <7>;
+            nuvoton,jack-eject-debounce = <7>;
+            nuvoton,crosstalk-enable;
+
+            clock-names = "mclk";
+            clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_2>;
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-09  5:10 [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema David Lin
@ 2023-05-09  6:13 ` Krzysztof Kozlowski
  2023-05-09  6:22 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09  6:13 UTC (permalink / raw)
  To: David Lin
  Cc: YHCHuang, ctlin0.linux, broonie, KCHSU0, SJLIN0, alsa-devel,
	lgirdwood, robh+dt, devicetree, krzysztof.kozlowski+dt, WTLI

On Tue, 09 May 2023 13:10:55 +0800, David Lin wrote:
> Convert the NAU8825 audio CODEC bindings to DT schema.
> 
> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
> ---
>  .../devicetree/bindings/sound/nau8825.txt     | 111 ---------
>  .../bindings/sound/nuvoton,nau8825.yaml       | 220 ++++++++++++++++++
>  2 files changed, 220 insertions(+), 111 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml:172:4: [warning] wrong indentation: expected 4 but found 3 (indentation)
./Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml:177:4: [warning] wrong indentation: expected 4 but found 3 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/nuvoton,nau8825.example.dtb: nau8825@1a: Unevaluated properties are not allowed ('interrupts' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml

See https://patchwork.ozlabs.org/patch/1778742

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-09  5:10 [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema David Lin
  2023-05-09  6:13 ` Krzysztof Kozlowski
@ 2023-05-09  6:22 ` Krzysztof Kozlowski
  2023-05-09  7:34   ` AS50 CTLin0
  1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09  6:22 UTC (permalink / raw)
  To: David Lin, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 09/05/2023 07:10, David Lin wrote:
> Convert the NAU8825 audio CODEC bindings to DT schema.
> 
> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
> ---
>  .../devicetree/bindings/sound/nau8825.txt     | 111 ---------
>  .../bindings/sound/nuvoton,nau8825.yaml       | 220 ++++++++++++++++++
>  2 files changed, 220 insertions(+), 111 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> 
> diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt
> deleted file mode 100644
> index a9c34526f4cb..000000000000
> --- a/Documentation/devicetree/bindings/sound/nau8825.txt
> +++ /dev/null
> @@ -1,111 +0,0 @@
> -Nuvoton NAU8825 audio codec

(...)

> +  nuvoton,jkdet-enable:
> +    description:
> +      Enable jack detection via JKDET pin.
> +    type: boolean
> +
> +  nuvoton,jkdet-pull-enable:
> +    description:
> +      Enable JKDET pin pull.
> +      If set - pin pull enabled, otherwise pin in high impedance state.
> +    type: boolean
> +
> +  nuvoton,jkdet-pull-up:
> +    description:
> +      Pull-up JKDET pin.
> +      If set then JKDET pin is pull up, otherwise pull down.
> +    type: boolean
> +
> +  nuvoton,jkdet-polarity:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      JKDET pin polarity.
> +    enum:
> +      - 0 # active high
> +      - 1 # active low

Since this is optional:
default: ?

Same in other places.

> +
> +  nuvoton,vref-impedance:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      VREF Impedance selection.
> +    enum:
> +      - 0 # Open
> +      - 1 # 25 kOhm
> +      - 2 # 125 kOhm
> +      - 3 # 2.5 kOhm
> +
> +  nuvoton,micbias-voltage:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Micbias voltage level.
> +    enum:
> +      - 0 # VDDA
> +      - 1 # VDDA
> +      - 2 # VDDA * 1.1
> +      - 3 # VDDA * 1.2
> +      - 4 # VDDA * 1.3
> +      - 5 # VDDA * 1.4
> +      - 6 # VDDA * 1.53
> +      - 7 # VDDA * 1.53
> +
> +  nuvoton,sar-threshold-num:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Number of buttons supported.
> +    minimum: 1
> +    maximum: 4
> +
> +  nuvoton,sar-threshold:
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    description:
> +      Impedance threshold for each button. Array that contains up to 8 buttons
> +      configuration. SAR value is calculated as
> +      SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
> +      configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
> +      'nuvoton,sar-voltage', R - button impedance.
> +      Refer datasheet section 10.2 for more information about threshold
> +      calculation.
> +    minItems: 1
> +    maxItems: 4
> +    items:
> +      minimum: 0
> +      maximum: 255
> +
> +  nuvoton,sar-hysteresis:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Button impedance measurement hysteresis.
> +
> +  nuvoton,sar-voltage:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Reference voltage for button impedance measurement.
> +    enum:
> +      - 0 # VDDA
> +      - 1 # VDDA
> +      - 2 # VDDA * 1.1
> +      - 3 # VDDA * 1.2
> +      - 4 # VDDA * 1.3
> +      - 5 # VDDA * 1.4
> +      - 6 # VDDA * 1.53
> +      - 7 # VDDA * 1.53
> +
> +  nuvoton,sar-compare-time:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      SAR compare time.
> +    enum:
> +      - 0 # 500ns
> +      - 1 # 1us
> +      - 2 # 2us
> +      - 3 # 4us
> +
> +  nuvoton,sar-sampling-time:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      SAR sampling time.
> +    enum:
> +      - 0 # 2us
> +      - 1 # 4us
> +      - 2 # 8us
> +      - 3 # 16us
> +
> +  nuvoton,short-key-debounce:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Button short key press debounce time.
> +    enum:
> +      - 0 # 30 ms
> +      - 1 # 50 ms
> +      - 2 # 100 ms
> +
> +  nuvoton,jack-insert-debounce:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      number from 0 to 7 that sets debounce time to 2^(n+2) ms.

maximum: 7

> +
> +  nuvoton,jack-eject-debounce:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      number from 0 to 7 that sets debounce time to 2^(n+2) ms

maximum: 7

> +
> +  nuvoton,crosstalk-enable:
> +    description:
> +      make crosstalk function enable if set.
> +    type: boolean
> +
> +  nuvoton,adcout-drive-strong:
> +    description:
> +      make the drive strength of ADCOUT IO PIN strong if set.
> +      Otherwise, the drive keeps normal strength.
> +    type: boolean
> +
> +  nuvoton,adc-delay-ms:
> +    description:
> +      Delay (in ms) to make input path stable and avoid pop noise.
> +      The default value is 125 and range between 125 to 500 ms.
> +    minimum: 125
> +    maximum: 500
> +
> +  clocks:
> +   description:
> +     list of phandle and clock specifier pairs according to common clock
> +     bindings for the clocks described in clock-names.

Drop description. maxItems: 1.

> +
> +  clock-names:
> +   description:
> +     should include "mclk" for the MCLK master clock.

No, you need to list entries with items.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/tegra-gpio.h>
> +    #include <dt-bindings/soc/tegra-pmc.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        headset: nau8825@1a {

Node names should be generic, audio-codec for example.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +            compatible = "nuvoton,nau8825";
> +            reg = <0x1a>;
Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-09  6:22 ` Krzysztof Kozlowski
@ 2023-05-09  7:34   ` AS50 CTLin0
  0 siblings, 0 replies; 9+ messages in thread
From: AS50 CTLin0 @ 2023-05-09  7:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 5/9/2023 2:22 PM, Krzysztof Kozlowski wrote:
> On 09/05/2023 07:10, David Lin wrote:
>> Convert the NAU8825 audio CODEC bindings to DT schema.
>>
>> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
>> ---
>>   .../devicetree/bindings/sound/nau8825.txt     | 111 ---------
>>   .../bindings/sound/nuvoton,nau8825.yaml       | 220 ++++++++++++++++++
>>   2 files changed, 220 insertions(+), 111 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>>   create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
> Does not look like you tested the bindings. Please run `make
> dt_binding_check` (see
> Documentation/devicetree/bindings/writing-schema.rst for instructions).

No, I had ever run 'make dt_binding_check', the result is no errors.

However, regarding your bot found the warnings, I check my environment
is not the latest dtschema and without yamllint.

>> diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt
>> deleted file mode 100644
>> index a9c34526f4cb..000000000000
>> --- a/Documentation/devicetree/bindings/sound/nau8825.txt
>> +++ /dev/null
>> @@ -1,111 +0,0 @@
>> -Nuvoton NAU8825 audio codec
> (...)
>
>> +  nuvoton,jkdet-enable:
>> +    description:
>> +      Enable jack detection via JKDET pin.
>> +    type: boolean
>> +
>> +  nuvoton,jkdet-pull-enable:
>> +    description:
>> +      Enable JKDET pin pull.
>> +      If set - pin pull enabled, otherwise pin in high impedance state.
>> +    type: boolean
>> +
>> +  nuvoton,jkdet-pull-up:
>> +    description:
>> +      Pull-up JKDET pin.
>> +      If set then JKDET pin is pull up, otherwise pull down.
>> +    type: boolean
>> +
>> +  nuvoton,jkdet-polarity:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      JKDET pin polarity.
>> +    enum:
>> +      - 0 # active high
>> +      - 1 # active low
> Since this is optional:
> default: ?
>
> Same in other places.
OK~I will add default value to these optional properties.
>> +
>> +  nuvoton,vref-impedance:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      VREF Impedance selection.
>> +    enum:
>> +      - 0 # Open
>> +      - 1 # 25 kOhm
>> +      - 2 # 125 kOhm
>> +      - 3 # 2.5 kOhm
>> +
>> +  nuvoton,micbias-voltage:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Micbias voltage level.
>> +    enum:
>> +      - 0 # VDDA
>> +      - 1 # VDDA
>> +      - 2 # VDDA * 1.1
>> +      - 3 # VDDA * 1.2
>> +      - 4 # VDDA * 1.3
>> +      - 5 # VDDA * 1.4
>> +      - 6 # VDDA * 1.53
>> +      - 7 # VDDA * 1.53
>> +
>> +  nuvoton,sar-threshold-num:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Number of buttons supported.
>> +    minimum: 1
>> +    maximum: 4
>> +
>> +  nuvoton,sar-threshold:
>> +    $ref: /schemas/types.yaml#/definitions/uint32-array
>> +    description:
>> +      Impedance threshold for each button. Array that contains up to 8 buttons
>> +      configuration. SAR value is calculated as
>> +      SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
>> +      configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
>> +      'nuvoton,sar-voltage', R - button impedance.
>> +      Refer datasheet section 10.2 for more information about threshold
>> +      calculation.
>> +    minItems: 1
>> +    maxItems: 4
>> +    items:
>> +      minimum: 0
>> +      maximum: 255
>> +
>> +  nuvoton,sar-hysteresis:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Button impedance measurement hysteresis.
>> +
>> +  nuvoton,sar-voltage:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Reference voltage for button impedance measurement.
>> +    enum:
>> +      - 0 # VDDA
>> +      - 1 # VDDA
>> +      - 2 # VDDA * 1.1
>> +      - 3 # VDDA * 1.2
>> +      - 4 # VDDA * 1.3
>> +      - 5 # VDDA * 1.4
>> +      - 6 # VDDA * 1.53
>> +      - 7 # VDDA * 1.53
>> +
>> +  nuvoton,sar-compare-time:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      SAR compare time.
>> +    enum:
>> +      - 0 # 500ns
>> +      - 1 # 1us
>> +      - 2 # 2us
>> +      - 3 # 4us
>> +
>> +  nuvoton,sar-sampling-time:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      SAR sampling time.
>> +    enum:
>> +      - 0 # 2us
>> +      - 1 # 4us
>> +      - 2 # 8us
>> +      - 3 # 16us
>> +
>> +  nuvoton,short-key-debounce:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Button short key press debounce time.
>> +    enum:
>> +      - 0 # 30 ms
>> +      - 1 # 50 ms
>> +      - 2 # 100 ms
>> +
>> +  nuvoton,jack-insert-debounce:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      number from 0 to 7 that sets debounce time to 2^(n+2) ms.
> maximum: 7
>
>> +
>> +  nuvoton,jack-eject-debounce:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      number from 0 to 7 that sets debounce time to 2^(n+2) ms
> maximum: 7
Regarding the description have limitation for range, so your comment is
great.
>
>> +
>> +  nuvoton,crosstalk-enable:
>> +    description:
>> +      make crosstalk function enable if set.
>> +    type: boolean
>> +
>> +  nuvoton,adcout-drive-strong:
>> +    description:
>> +      make the drive strength of ADCOUT IO PIN strong if set.
>> +      Otherwise, the drive keeps normal strength.
>> +    type: boolean
>> +
>> +  nuvoton,adc-delay-ms:
>> +    description:
>> +      Delay (in ms) to make input path stable and avoid pop noise.
>> +      The default value is 125 and range between 125 to 500 ms.
>> +    minimum: 125
>> +    maximum: 500
>> +
>> +  clocks:
>> +   description:
>> +     list of phandle and clock specifier pairs according to common clock
>> +     bindings for the clocks described in clock-names.
> Drop description. maxItems: 1.
OK~I will add  it.
>
>> +
>> +  clock-names:
>> +   description:
>> +     should include "mclk" for the MCLK master clock.
> No, you need to list entries with items.
OK~I will add  it.
>
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/gpio/tegra-gpio.h>
>> +    #include <dt-bindings/soc/tegra-pmc.h>
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +    i2c {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +        headset: nau8825@1a {
> Node names should be generic, audio-codec for example.
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
OK~I can follow it.
>> +            compatible = "nuvoton,nau8825";
>> +            reg = <0x1a>;
> Best regards,
> Krzysztof
>
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
@ 2023-05-10  3:44 David Lin
  2023-05-10  7:19 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: David Lin @ 2023-05-10  3:44 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux,
	David Lin

Convert the NAU8825 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
---
 .../devicetree/bindings/sound/nau8825.txt     | 111 --------
 .../bindings/sound/nuvoton,nau8825.yaml       | 242 ++++++++++++++++++
 2 files changed, 242 insertions(+), 111 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
 create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml

diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt
deleted file mode 100644
index a9c34526f4cb..000000000000
--- a/Documentation/devicetree/bindings/sound/nau8825.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-Nuvoton NAU8825 audio codec
-
-This device supports I2C only.
-
-Required properties:
-  - compatible : Must be "nuvoton,nau8825"
-
-  - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1).
-
-Optional properties:
-  - nuvoton,jkdet-enable: Enable jack detection via JKDET pin.
-  - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled,
-      otherwise pin in high impedance state.
-  - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
-  - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.
-
-  - nuvoton,vref-impedance: VREF Impedance selection
-      0 - Open
-      1 - 25 kOhm
-      2 - 125 kOhm
-      3 - 2.5 kOhm
-
-  - nuvoton,micbias-voltage: Micbias voltage level.
-      0 - VDDA
-      1 - VDDA
-      2 - VDDA * 1.1
-      3 - VDDA * 1.2
-      4 - VDDA * 1.3
-      5 - VDDA * 1.4
-      6 - VDDA * 1.53
-      7 - VDDA * 1.53
-
-  - nuvoton,sar-threshold-num: Number of buttons supported
-  - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
-    SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
-    where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
-    Refer datasheet section 10.2 for more information about threshold calculation.
-
-  - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.
-
-  - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
-      0 - VDDA
-      1 - VDDA
-      2 - VDDA * 1.1
-      3 - VDDA * 1.2
-      4 - VDDA * 1.3
-      5 - VDDA * 1.4
-      6 - VDDA * 1.53
-      7 - VDDA * 1.53
-
-  - nuvoton,sar-compare-time: SAR compare time
-      0 - 500 ns
-      1 - 1 us
-      2 - 2 us
-      3 - 4 us
-
-  - nuvoton,sar-sampling-time: SAR sampling time
-      0 - 2 us
-      1 - 4 us
-      2 - 8 us
-      3 - 16 us
-
-  - nuvoton,short-key-debounce: Button short key press debounce time.
-      0 - 30 ms
-      1 - 50 ms
-      2 - 100 ms
-      3 - 30 ms
-
-  - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
-  - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
-
-  - nuvoton,crosstalk-enable: make crosstalk function enable if set.
-
-  - nuvoton,adcout-drive-strong: make the drive strength of ADCOUT IO PIN strong if set.
-      Otherwise, the drive keeps normal strength.
-
-  - nuvoton,adc-delay-ms: Delay (in ms) to make input path stable and avoid pop noise. The
-      default value is 125 and range between 125 to 500 ms.
-
-  - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
-      clocks described in clock-names
-  - clock-names: should include "mclk" for the MCLK master clock
-
-Example:
-
-  headset: nau8825@1a {
-      compatible = "nuvoton,nau8825";
-      reg = <0x1a>;
-      interrupt-parent = <&gpio>;
-      interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
-      nuvoton,jkdet-enable;
-      nuvoton,jkdet-pull-enable;
-      nuvoton,jkdet-pull-up;
-      nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
-      nuvoton,vref-impedance = <2>;
-      nuvoton,micbias-voltage = <6>;
-      // Setup 4 buttons impedance according to Android specification
-      nuvoton,sar-threshold-num = <4>;
-      nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
-      nuvoton,sar-hysteresis = <1>;
-      nuvoton,sar-voltage = <0>;
-      nuvoton,sar-compare-time = <0>;
-      nuvoton,sar-sampling-time = <0>;
-      nuvoton,short-key-debounce = <2>;
-      nuvoton,jack-insert-debounce = <7>;
-      nuvoton,jack-eject-debounce = <7>;
-      nuvoton,crosstalk-enable;
-
-      clock-names = "mclk";
-      clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_2>;
-  };
diff --git a/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml b/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
new file mode 100644
index 000000000000..ab352422d48e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
@@ -0,0 +1,242 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nuvoton,nau8825.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NAU8825 audio CODEC
+
+maintainers:
+  - John Hsu <KCHSU0@nuvoton.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,nau8825
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description:
+      The CODEC's interrupt output.
+
+  nuvoton,jkdet-enable:
+    description:
+      Enable jack detection via JKDET pin.
+    type: boolean
+
+  nuvoton,jkdet-pull-enable:
+    description:
+      Enable JKDET pin pull.
+      If set - pin pull enabled, otherwise pin in high impedance state.
+    type: boolean
+
+  nuvoton,jkdet-pull-up:
+    description:
+      Pull-up JKDET pin.
+      If set then JKDET pin is pull up, otherwise pull down.
+    type: boolean
+
+  nuvoton,jkdet-polarity:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      JKDET pin polarity.
+    enum:
+      - 0 # active high
+      - 1 # active low
+    default: 1
+
+  nuvoton,vref-impedance:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      VREF Impedance selection.
+    enum:
+      - 0 # Open
+      - 1 # 25 kOhm
+      - 2 # 125 kOhm
+      - 3 # 2.5 kOhm
+    default: 2
+
+  nuvoton,micbias-voltage:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Micbias voltage level.
+    enum:
+      - 0 # VDDA
+      - 1 # VDDA
+      - 2 # VDDA * 1.1
+      - 3 # VDDA * 1.2
+      - 4 # VDDA * 1.3
+      - 5 # VDDA * 1.4
+      - 6 # VDDA * 1.53
+      - 7 # VDDA * 1.53
+    default: 6
+
+  nuvoton,sar-threshold-num:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Number of buttons supported.
+    minimum: 1
+    maximum: 4
+    default: 4
+
+  nuvoton,sar-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description:
+      Impedance threshold for each button. Array that contains up to 8 buttons
+      configuration. SAR value is calculated as
+      SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
+      configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
+      'nuvoton,sar-voltage', R - button impedance.
+      Refer datasheet section 10.2 for more information about threshold
+      calculation.
+    minItems: 1
+    maxItems: 4
+    items:
+      minimum: 0
+      maximum: 255
+
+  nuvoton,sar-hysteresis:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Button impedance measurement hysteresis.
+    default: 0
+
+  nuvoton,sar-voltage:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Reference voltage for button impedance measurement.
+    enum:
+      - 0 # VDDA
+      - 1 # VDDA
+      - 2 # VDDA * 1.1
+      - 3 # VDDA * 1.2
+      - 4 # VDDA * 1.3
+      - 5 # VDDA * 1.4
+      - 6 # VDDA * 1.53
+      - 7 # VDDA * 1.53
+    default: 6
+
+  nuvoton,sar-compare-time:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      SAR compare time.
+    enum:
+      - 0 # 500 ns
+      - 1 # 1 us
+      - 2 # 2 us
+      - 3 # 4 us
+    default: 1
+
+  nuvoton,sar-sampling-time:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      SAR sampling time.
+    enum:
+      - 0 # 2 us
+      - 1 # 4 us
+      - 2 # 8 us
+      - 3 # 16 us
+    default: 1
+
+  nuvoton,short-key-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Button short key press debounce time.
+    enum:
+      - 0 # 30 ms
+      - 1 # 50 ms
+      - 2 # 100 ms
+      - 3 # 30 ms
+    default: 3
+
+  nuvoton,jack-insert-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      number from 0 to 7 that sets debounce time to 2^(n+2) ms.
+    maximum: 7
+    default: 7
+
+  nuvoton,jack-eject-debounce:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      number from 0 to 7 that sets debounce time to 2^(n+2) ms
+    maximum: 7
+    default: 0
+
+  nuvoton,crosstalk-enable:
+    description:
+      make crosstalk function enable if set.
+    type: boolean
+
+  nuvoton,adcout-drive-strong:
+    description:
+      make the drive strength of ADCOUT IO PIN strong if set.
+      Otherwise, the drive keeps normal strength.
+    type: boolean
+
+  nuvoton,adc-delay-ms:
+    description:
+      Delay (in ms) to make input path stable and avoid pop noise.
+      The default value is 125 and range between 125 to 500 ms.
+    minimum: 125
+    maximum: 500
+    default: 125
+
+  clocks:
+    description:
+      list of phandle and clock specifier pairs according to common clock
+      bindings for the clocks described in clock-names.
+    maxItems: 1
+
+  clock-names:
+    description:
+      should include "mclk" for the MCLK master clock.
+    items:
+      - const: mclk
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        nau8825@1a {
+            compatible = "nuvoton,nau8825";
+            reg = <0x1a>;
+            interrupt-parent = <&gpio>;
+            interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+            nuvoton,jkdet-enable;
+            nuvoton,jkdet-pull-enable;
+            nuvoton,jkdet-pull-up;
+            nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
+            nuvoton,vref-impedance = <2>;
+            nuvoton,micbias-voltage = <6>;
+            // Setup 4 buttons impedance according to Android specification
+            nuvoton,sar-threshold-num = <4>;
+            nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
+            nuvoton,sar-hysteresis = <1>;
+            nuvoton,sar-voltage = <0>;
+            nuvoton,sar-compare-time = <0>;
+            nuvoton,sar-sampling-time = <0>;
+            nuvoton,short-key-debounce = <2>;
+            nuvoton,jack-insert-debounce = <7>;
+            nuvoton,jack-eject-debounce = <7>;
+            nuvoton,crosstalk-enable;
+
+            clock-names = "mclk";
+            clocks = <&tegra_pmc 1>;
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-10  3:44 David Lin
@ 2023-05-10  7:19 ` Krzysztof Kozlowski
  2023-05-10  7:42   ` AS50 CTLin0
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-10  7:19 UTC (permalink / raw)
  To: David Lin, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 10/05/2023 05:44, David Lin wrote:
> Convert the NAU8825 audio CODEC bindings to DT schema.
> 
> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
> ---

Version your patches and provide changelog after ---.

If you just send the same with the same mistakes, that's a NAK.

>  .../devicetree/bindings/sound/nau8825.txt     | 111 --------
>  .../bindings/sound/nuvoton,nau8825.yaml       | 242 ++++++++++++++++++
>  2 files changed, 242 insertions(+), 111 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
> 


> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        nau8825@1a {

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.

Thank you.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-10  7:19 ` Krzysztof Kozlowski
@ 2023-05-10  7:42   ` AS50 CTLin0
  2023-05-10  7:48     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: AS50 CTLin0 @ 2023-05-10  7:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 5/10/2023 3:19 PM, Krzysztof Kozlowski wrote:
> On 10/05/2023 05:44, David Lin wrote:
>> Convert the NAU8825 audio CODEC bindings to DT schema.
>>
>> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
>> ---
> Version your patches and provide changelog after ---.
>
> If you just send the same with the same mistakes, that's a NAK.

I know your meanings is to show change log from v1 to v2, but I see
previous patch have other missing items.

Therefore, I revise it and included your comments. Anyway, I can back to
previous patch and re-send v2 patch with changelog.

>
>>   .../devicetree/bindings/sound/nau8825.txt     | 111 --------
>>   .../bindings/sound/nuvoton,nau8825.yaml       | 242 ++++++++++++++++++
>>   2 files changed, 242 insertions(+), 111 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>>   create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
>>
>
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/gpio/gpio.h>
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +    i2c {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +        nau8825@1a {
> This is a friendly reminder during the review process.
>
> It seems my previous comments were not fully addressed. Maybe my
> feedback got lost between the quotes, maybe you just forgot to apply it.
> Please go back to the previous discussion and either implement all
> requested changes or keep discussing them.
>
> Thank you.
>
> Best regards,
> Krzysztof

About node item, maybe I misunderstand your meanings.

When I change from headset: nau8825@1a to audio-codec: nau8825@1a, it
will have compiler error.

So I use nau8825@1a to submit.However, when I see your latest comment, I
seems to understand your point for node name.

The final result will be codec@1a or audio-codec@1a, right?

>
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-10  7:42   ` AS50 CTLin0
@ 2023-05-10  7:48     ` Krzysztof Kozlowski
  2023-05-10  8:54       ` AS50 CTLin0
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-10  7:48 UTC (permalink / raw)
  To: AS50 CTLin0, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 10/05/2023 09:42, AS50 CTLin0 wrote:
> On 5/10/2023 3:19 PM, Krzysztof Kozlowski wrote:
>> On 10/05/2023 05:44, David Lin wrote:
>>> Convert the NAU8825 audio CODEC bindings to DT schema.
>>>
>>> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
>>> ---
>> Version your patches and provide changelog after ---.
>>
>> If you just send the same with the same mistakes, that's a NAK.
> 
> I know your meanings is to show change log from v1 to v2, but I see
> previous patch have other missing items.

I don't understand it. It does not matter what else is missing in
previous patch. You always must version them and always provide changelog.

> 
> Therefore, I revise it and included your comments. Anyway, I can back to
> previous patch and re-send v2 patch with changelog.

Paste it here (and in v3 of course).

> 
>>
>>>   .../devicetree/bindings/sound/nau8825.txt     | 111 --------
>>>   .../bindings/sound/nuvoton,nau8825.yaml       | 242 ++++++++++++++++++
>>>   2 files changed, 242 insertions(+), 111 deletions(-)
>>>   delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>>>   create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
>>>
>>
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +
>>> +unevaluatedProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/gpio/gpio.h>
>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>> +    i2c {
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>> +        nau8825@1a {
>> This is a friendly reminder during the review process.
>>
>> It seems my previous comments were not fully addressed. Maybe my
>> feedback got lost between the quotes, maybe you just forgot to apply it.
>> Please go back to the previous discussion and either implement all
>> requested changes or keep discussing them.
>>
>> Thank you.
>>
>> Best regards,
>> Krzysztof
> 
> About node item, maybe I misunderstand your meanings.
> 
> When I change from headset: nau8825@1a to audio-codec: nau8825@1a, it
> will have compiler error.

That's label, not nodename. Why would even this create a compile error?

> 
> So I use nau8825@1a to submit.However, when I see your latest comment, I
> seems to understand your point for node name.
> 
> The final result will be codec@1a or audio-codec@1a, right?

Yes.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema
  2023-05-10  7:48     ` Krzysztof Kozlowski
@ 2023-05-10  8:54       ` AS50 CTLin0
  0 siblings, 0 replies; 9+ messages in thread
From: AS50 CTLin0 @ 2023-05-10  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 5/10/2023 3:48 PM, Krzysztof Kozlowski wrote:
> On 10/05/2023 09:42, AS50 CTLin0 wrote:
>> On 5/10/2023 3:19 PM, Krzysztof Kozlowski wrote:
>>> On 10/05/2023 05:44, David Lin wrote:
>>>> Convert the NAU8825 audio CODEC bindings to DT schema.
>>>>
>>>> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
>>>> ---
>>> Version your patches and provide changelog after ---.
>>>
>>> If you just send the same with the same mistakes, that's a NAK.
>> I know your meanings is to show change log from v1 to v2, but I see
>> previous patch have other missing items.
> I don't understand it. It does not matter what else is missing in
> previous patch. You always must version them and always provide changelog.
Noted.
>
>> Therefore, I revise it and included your comments. Anyway, I can back to
>> previous patch and re-send v2 patch with changelog.
> Paste it here (and in v3 of course).
Changes:
V1 -> V2:
   - add interrupts properties
   - add maximum to nuvoton,jack-insert-debounce and
nuvoton,jack-eject-debounce properites
   - add a enum item for nuvoton,short-key-debounce properites
   - add default value for most properites
   - add maxItems to clocks properites and mclk entries to clock-names
properites
   - refine wrong indentation from clocks and clock-names
   - refine dts example for interrupts and clocks
   - remove headset label from dts example
>
>>>>    .../devicetree/bindings/sound/nau8825.txt     | 111 --------
>>>>    .../bindings/sound/nuvoton,nau8825.yaml       | 242 ++++++++++++++++++
>>>>    2 files changed, 242 insertions(+), 111 deletions(-)
>>>>    delete mode 100644 Documentation/devicetree/bindings/sound/nau8825.txt
>>>>    create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
>>>>
>>>> +required:
>>>> +  - compatible
>>>> +  - reg
>>>> +
>>>> +unevaluatedProperties: false
>>>> +
>>>> +examples:
>>>> +  - |
>>>> +    #include <dt-bindings/gpio/gpio.h>
>>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>>> +    i2c {
>>>> +        #address-cells = <1>;
>>>> +        #size-cells = <0>;
>>>> +        nau8825@1a {
>>> This is a friendly reminder during the review process.
>>>
>>> It seems my previous comments were not fully addressed. Maybe my
>>> feedback got lost between the quotes, maybe you just forgot to apply it.
>>> Please go back to the previous discussion and either implement all
>>> requested changes or keep discussing them.
>>>
>>> Thank you.
>>>
>>> Best regards,
>>> Krzysztof
>> About node item, maybe I misunderstand your meanings.
>>
>> When I change from headset: nau8825@1a to audio-codec: nau8825@1a, it
>> will have compiler error.
> That's label, not nodename. Why would even this create a compile error?

if the label is change name from headset to audio-codec, it will caused
compiler errors with the following error "FATAL ERROR: Unable to parse
input tree".

So far, I don't know why label name will caused compiler error, but it
might be caused parse error by '-'.
>
>> So I use nau8825@1a to submit.However, when I see your latest comment, I
>> seems to understand your point for node name.
>>
>> The final result will be codec@1a or audio-codec@1a, right?
> Yes.
>
> Best regards,
> Krzysztof
Thanks for your guide. I will send the v3 with the changelog.
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-05-10  8:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09  5:10 [PATCH] ASoC: dt-bindings: nau8825: Convert to dtschema David Lin
2023-05-09  6:13 ` Krzysztof Kozlowski
2023-05-09  6:22 ` Krzysztof Kozlowski
2023-05-09  7:34   ` AS50 CTLin0
  -- strict thread matches above, loose matches on Subject: below --
2023-05-10  3:44 David Lin
2023-05-10  7:19 ` Krzysztof Kozlowski
2023-05-10  7:42   ` AS50 CTLin0
2023-05-10  7:48     ` Krzysztof Kozlowski
2023-05-10  8:54       ` AS50 CTLin0

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).