diff mbox series

[V4,03/10] dt-bindings: timestamp: Deprecate nvidia,slices property

Message ID 20230323012929.10815-4-dipenp@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Dipen Patel
Headers show
Series Add Tegra234 HTE support | expand

Commit Message

Dipen Patel March 23, 2023, 1:29 a.m. UTC
The property is not necessary as it is a constant value and can be
hardcoded in the driver code.

Signed-off-by: Dipen Patel <dipenp@nvidia.com>
---
 .../timestamp/nvidia,tegra194-hte.yaml        | 43 ++-----------------
 1 file changed, 4 insertions(+), 39 deletions(-)

Comments

Linus Walleij March 23, 2023, 8:34 a.m. UTC | #1
On Thu, Mar 23, 2023 at 2:29 AM Dipen Patel <dipenp@nvidia.com> wrote:

> The property is not necessary as it is a constant value and can be
> hardcoded in the driver code.
>
> Signed-off-by: Dipen Patel <dipenp@nvidia.com>

Looks completely reasonable to me!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Krzysztof Kozlowski March 25, 2023, 11:05 a.m. UTC | #2
On 23/03/2023 02:29, Dipen Patel wrote:
> The property is not necessary as it is a constant value and can be
> hardcoded in the driver code.
> 
> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
> ---
>  .../timestamp/nvidia,tegra194-hte.yaml        | 43 ++-----------------
>  1 file changed, 4 insertions(+), 39 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
> index 158dbe58c49f..eafc33e9ae2e 100644
> --- a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
> +++ b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
> @@ -42,10 +42,13 @@ properties:
>  
>    nvidia,slices:
>      $ref: /schemas/types.yaml#/definitions/uint32
> +    deprecated: true
>      description:
>        HTE lines are arranged in 32 bit slice where each bit represents different
>        line/signal that it can enable/configure for the timestamp. It is u32
> -      property and the value depends on the HTE instance in the chip.
> +      property and the value depends on the HTE instance in the chip. The AON
> +      GTE instances for both Tegra194 and Tegra234 has 3 slices. The Tegra194
> +      LIC instance has 11 slices and Tegra234 LIC has 17 slices.
>      enum: [3, 11, 17]
>  
>    '#timestamp-cells':
> @@ -56,46 +59,10 @@ properties:
>        mentioned in the nvidia GPIO device tree binding document.
>      const: 1
>  
> -allOf:
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - nvidia,tegra194-gte-aon
> -              - nvidia,tegra234-gte-aon
> -    then:
> -      properties:
> -        nvidia,slices:
> -          const: 3
> -
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - nvidia,tegra194-gte-lic
> -    then:
> -      properties:
> -        nvidia,slices:
> -          const: 11
> -
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - nvidia,tegra234-gte-lic
> -    then:
> -      properties:
> -        nvidia,slices:
> -          const: 17

You just added this entire block in previous patch. Adding it there and
immediately removing does not make much sense.
> -



Best regards,
Krzysztof
Dipen Patel April 3, 2023, 6:49 p.m. UTC | #3
On 3/25/23 4:05 AM, Krzysztof Kozlowski wrote:
> On 23/03/2023 02:29, Dipen Patel wrote:
>> The property is not necessary as it is a constant value and can be
>> hardcoded in the driver code.
>>
>> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
>> ---
>>  .../timestamp/nvidia,tegra194-hte.yaml        | 43 ++-----------------
>>  1 file changed, 4 insertions(+), 39 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
>> index 158dbe58c49f..eafc33e9ae2e 100644
>> --- a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
>> +++ b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
>> @@ -42,10 +42,13 @@ properties:
>>  
>>    nvidia,slices:
>>      $ref: /schemas/types.yaml#/definitions/uint32
>> +    deprecated: true
>>      description:
>>        HTE lines are arranged in 32 bit slice where each bit represents different
>>        line/signal that it can enable/configure for the timestamp. It is u32
>> -      property and the value depends on the HTE instance in the chip.
>> +      property and the value depends on the HTE instance in the chip. The AON
>> +      GTE instances for both Tegra194 and Tegra234 has 3 slices. The Tegra194
>> +      LIC instance has 11 slices and Tegra234 LIC has 17 slices.
>>      enum: [3, 11, 17]
>>  
>>    '#timestamp-cells':
>> @@ -56,46 +59,10 @@ properties:
>>        mentioned in the nvidia GPIO device tree binding document.
>>      const: 1
>>  
>> -allOf:
>> -  - if:
>> -      properties:
>> -        compatible:
>> -          contains:
>> -            enum:
>> -              - nvidia,tegra194-gte-aon
>> -              - nvidia,tegra234-gte-aon
>> -    then:
>> -      properties:
>> -        nvidia,slices:
>> -          const: 3
>> -
>> -  - if:
>> -      properties:
>> -        compatible:
>> -          contains:
>> -            enum:
>> -              - nvidia,tegra194-gte-lic
>> -    then:
>> -      properties:
>> -        nvidia,slices:
>> -          const: 11
>> -
>> -  - if:
>> -      properties:
>> -        compatible:
>> -          contains:
>> -            enum:
>> -              - nvidia,tegra234-gte-lic
>> -    then:
>> -      properties:
>> -        nvidia,slices:
>> -          const: 17
> 
> You just added this entire block in previous patch. Adding it there and
> immediately removing does not make much sense.
Yes, probably I should just keep that block in this patch as it is since
there is a deprecate field already introduced by this patch which should be enough. 

>> -
> 
> 
> 
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
index 158dbe58c49f..eafc33e9ae2e 100644
--- a/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
+++ b/Documentation/devicetree/bindings/timestamp/nvidia,tegra194-hte.yaml
@@ -42,10 +42,13 @@  properties:
 
   nvidia,slices:
     $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
     description:
       HTE lines are arranged in 32 bit slice where each bit represents different
       line/signal that it can enable/configure for the timestamp. It is u32
-      property and the value depends on the HTE instance in the chip.
+      property and the value depends on the HTE instance in the chip. The AON
+      GTE instances for both Tegra194 and Tegra234 has 3 slices. The Tegra194
+      LIC instance has 11 slices and Tegra234 LIC has 17 slices.
     enum: [3, 11, 17]
 
   '#timestamp-cells':
@@ -56,46 +59,10 @@  properties:
       mentioned in the nvidia GPIO device tree binding document.
     const: 1
 
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - nvidia,tegra194-gte-aon
-              - nvidia,tegra234-gte-aon
-    then:
-      properties:
-        nvidia,slices:
-          const: 3
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - nvidia,tegra194-gte-lic
-    then:
-      properties:
-        nvidia,slices:
-          const: 11
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - nvidia,tegra234-gte-lic
-    then:
-      properties:
-        nvidia,slices:
-          const: 17
-
 required:
   - compatible
   - reg
   - interrupts
-  - nvidia,slices
   - "#timestamp-cells"
 
 additionalProperties: false
@@ -107,7 +74,6 @@  examples:
               reg = <0xc1e0000 0x10000>;
               interrupts = <0 13 0x4>;
               nvidia,int-threshold = <1>;
-              nvidia,slices = <3>;
               #timestamp-cells = <1>;
     };
 
@@ -117,7 +83,6 @@  examples:
               reg = <0x3aa0000 0x10000>;
               interrupts = <0 11 0x4>;
               nvidia,int-threshold = <1>;
-              nvidia,slices = <11>;
               #timestamp-cells = <1>;
     };