diff mbox series

[v3,5/6] dt-bindings: Document Tegra234 HDA support

Message ID 20220216092240.26464-6-mkumard@nvidia.com (mailing list archive)
State New, archived
Headers show
Series Add Tegra234 HDA support | expand

Commit Message

Mohan Kumar Feb. 16, 2022, 9:22 a.m. UTC
Update binding document for HDA support on Tegra234 chip.

Tegra234 has max of 2 clocks and 2 resets which requires to add
minItems and maxItems for clocks and resets as Tegra chips can
now have minimum of 2 and maximum of 3 clocks and reset support.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
---
 .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml          | 3 +++
 1 file changed, 3 insertions(+)

Comments

Krzysztof Kozlowski Feb. 16, 2022, 10:29 a.m. UTC | #1
On 16/02/2022 10:22, Mohan Kumar wrote:
> Update binding document for HDA support on Tegra234 chip.
> 
> Tegra234 has max of 2 clocks and 2 resets which requires to add
> minItems and maxItems for clocks and resets as Tegra chips can
> now have minimum of 2 and maximum of 3 clocks and reset support.
> 
> Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
> ---
>  .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml          | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> index 2c913aa44fee..12c31b4b99e1 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> @@ -23,6 +23,7 @@ properties:
>        - const: nvidia,tegra30-hda
>        - items:
>            - enum:
> +              - nvidia,tegra234-hda

Why putting it in non-alphabetical order? Although someone put
nvidia,tegra124-hda already at the end of list... having things ordered
is helpful to avoid conflicts and makes code easier to read.


Best regards,
Krzysztof
Mohan Kumar Feb. 16, 2022, 10:54 a.m. UTC | #2
Hi Krzysztof Kozlowski, 
The current order is intentional to reflect the new->old chip, the top entry is newer chip. If needed we can add comment to reflect this info.

-----Original Message-----
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 
Sent: Wednesday, February 16, 2022 4:00 PM
To: Mohan Kumar D <mkumard@nvidia.com>; broonie@kernel.org; lgirdwood@gmail.com; robh+dt@kernel.org; thierry.reding@gmail.com; tiwai@suse.com; Jonathan Hunter <jonathanh@nvidia.com>; Sameer Pujar <spujar@nvidia.com>
Cc: alsa-devel@alsa-project.org; devicetree@vger.kernel.org; linux-tegra@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/6] dt-bindings: Document Tegra234 HDA support

External email: Use caution opening links or attachments


On 16/02/2022 10:22, Mohan Kumar wrote:
> Update binding document for HDA support on Tegra234 chip.
>
> Tegra234 has max of 2 clocks and 2 resets which requires to add 
> minItems and maxItems for clocks and resets as Tegra chips can now 
> have minimum of 2 and maximum of 3 clocks and reset support.
>
> Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
> ---
>  .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml          | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git 
> a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml 
> b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> index 2c913aa44fee..12c31b4b99e1 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> @@ -23,6 +23,7 @@ properties:
>        - const: nvidia,tegra30-hda
>        - items:
>            - enum:
> +              - nvidia,tegra234-hda

Why putting it in non-alphabetical order? Although someone put nvidia,tegra124-hda already at the end of list... having things ordered is helpful to avoid conflicts and makes code easier to read.


Best regards,
Krzysztof
Krzysztof Kozlowski Feb. 16, 2022, 10:58 a.m. UTC | #3
On Wed, 16 Feb 2022 at 11:54, Mohan Kumar D <mkumard@nvidia.com> wrote:
>
> Hi Krzysztof Kozlowski,
> The current order is intentional to reflect the new->old chip, the top entry is newer chip. If needed we can add comment to reflect this info.
>

Hm, okay, such ordering sounds good as well. :)

Thanks!

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
index 2c913aa44fee..12c31b4b99e1 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
@@ -23,6 +23,7 @@  properties:
       - const: nvidia,tegra30-hda
       - items:
           - enum:
+              - nvidia,tegra234-hda
               - nvidia,tegra194-hda
               - nvidia,tegra186-hda
               - nvidia,tegra210-hda
@@ -41,9 +42,11 @@  properties:
     maxItems: 1
 
   clocks:
+    minItems: 2
     maxItems: 3
 
   clock-names:
+    minItems: 2
     items:
       - const: hda
       - const: hda2hdmi