diff mbox series

[v1,1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: deprecate port property

Message ID 6626d288-ecf1-436b-b0a3-3417308a8633@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: deprecate port property | expand

Commit Message

Johan Jonker Jan. 30, 2024, 2:55 p.m. UTC
The hdmi-connector nodes are now functional and the new way to model
hdmi nodes with, so deprecate the port property and make port@0 and
port@1 a requirement. Also update example.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 .../display/rockchip/rockchip,dw-hdmi.yaml    | 27 ++++++++++++++++---
 1 file changed, 23 insertions(+), 4 deletions(-)

--
2.39.2

Comments

Conor Dooley Jan. 30, 2024, 6:18 p.m. UTC | #1
On Tue, Jan 30, 2024 at 03:55:43PM +0100, Johan Jonker wrote:
> The hdmi-connector nodes are now functional and the new way to model
> hdmi nodes with, so deprecate the port property and

This doesn't really explain what makes having hdmi-connector nodes
replace the usecase for "port".

> make port@0 and
> port@1 a requirement.

Why?

> Also update example.

"Also do x" is a red flag when it comes to commit messages, as it
immediately makes me think that this should be more than one commit.
I'd probably write this as "Update the example to avoid use of the
deprecated property" or something to avoid bad gut reactions.
That's not worth resending for though obviously...

> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>  .../display/rockchip/rockchip,dw-hdmi.yaml    | 27 ++++++++++++++++---
>  1 file changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> index 7e59dee15a5f..cd0a42f35f24 100644
> --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> @@ -97,8 +97,11 @@ properties:
>    ports:
>      $ref: /schemas/graph.yaml#/properties/ports
> 
> -    patternProperties:
> -      "^port(@0)?$":
> +    properties:
> +      port:
> +        $ref: /schemas/graph.yaml#/properties/port
> +        deprecated: true

This change makes the deprecated property's description incomplete,
since it doesn't cover the endpoints any more. It also doesn't make
port@0 and port mutually exclusive.
I think I'd just be inclined to delete the "port" bit entirely from the
binding if you're not gonna preserve the description of what that
property was meant to be. Otherwise, I'd be doing something like:
@@ -112,6 +112,8 @@ properties:
           endpoint@1:
             description: Connection to the VOPL
     properties:
+      port:
+        deprecated: true
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
         description: Output of the DWC HDMI TX

So that the description of the deprecated property is maintained.

Cheers,
Conor.

> +      port@0:
>          $ref: /schemas/graph.yaml#/properties/port
>          description: Input of the DWC HDMI TX
>          properties:
> @@ -108,11 +111,14 @@ properties:
>              description: Connection to the VOPB
>            endpoint@1:
>              description: Connection to the VOPL
> -    properties:
>        port@1:
>          $ref: /schemas/graph.yaml#/properties/port
>          description: Output of the DWC HDMI TX
> 
> +    required:
> +      - port@0
> +      - port@1
> +
>    rockchip,grf:
>      $ref: /schemas/types.yaml#/definitions/phandle
>      description:
> @@ -147,7 +153,11 @@ examples:
>          clock-names = "iahb", "isfr";
> 
>          ports {
> -            port {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            port@0 {
> +                reg = <0>;
>                  #address-cells = <1>;
>                  #size-cells = <0>;
> 
> @@ -155,11 +165,20 @@ examples:
>                      reg = <0>;
>                      remote-endpoint = <&vopb_out_hdmi>;
>                  };
> +
>                  hdmi_in_vopl: endpoint@1 {
>                      reg = <1>;
>                      remote-endpoint = <&vopl_out_hdmi>;
>                  };
>              };
> +
> +            port@1 {
> +                reg = <1>;
> +
> +                hdmi_out_con: endpoint {
> +                    remote-endpoint = <&hdmi_con_in>;
> +                };
> +            };
>          };
>      };
> 
> --
> 2.39.2
>
Rob Herring (Arm) Jan. 31, 2024, 2:15 p.m. UTC | #2
On Tue, Jan 30, 2024 at 06:18:49PM +0000, Conor Dooley wrote:
> On Tue, Jan 30, 2024 at 03:55:43PM +0100, Johan Jonker wrote:
> > The hdmi-connector nodes are now functional and the new way to model
> > hdmi nodes with, so deprecate the port property and
> 
> This doesn't really explain what makes having hdmi-connector nodes
> replace the usecase for "port".
> 
> > make port@0 and
> > port@1 a requirement.
> 
> Why?

That means the deprecated way will always have warnings which makes 
documenting the deprecated stuff a bit pointless. Technically, new 
required properties are ABI break and something I'm working on making 
the tools check (by comparing 2 versions of schemas). That said, if all 
the upstream dts files are fixed already, then I don't care too much.


> > Also update example.
> 
> "Also do x" is a red flag when it comes to commit messages, as it
> immediately makes me think that this should be more than one commit.
> I'd probably write this as "Update the example to avoid use of the
> deprecated property" or something to avoid bad gut reactions.
> That's not worth resending for though obviously...
> 
> > 
> > Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> > ---
> >  .../display/rockchip/rockchip,dw-hdmi.yaml    | 27 ++++++++++++++++---
> >  1 file changed, 23 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > index 7e59dee15a5f..cd0a42f35f24 100644
> > --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > @@ -97,8 +97,11 @@ properties:
> >    ports:
> >      $ref: /schemas/graph.yaml#/properties/ports
> > 
> > -    patternProperties:
> > -      "^port(@0)?$":
> > +    properties:
> > +      port:
> > +        $ref: /schemas/graph.yaml#/properties/port
> > +        deprecated: true
> 
> This change makes the deprecated property's description incomplete,
> since it doesn't cover the endpoints any more. It also doesn't make
> port@0 and port mutually exclusive.

graph.yaml has a check that effectively does that.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
index 7e59dee15a5f..cd0a42f35f24 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
@@ -97,8 +97,11 @@  properties:
   ports:
     $ref: /schemas/graph.yaml#/properties/ports

-    patternProperties:
-      "^port(@0)?$":
+    properties:
+      port:
+        $ref: /schemas/graph.yaml#/properties/port
+        deprecated: true
+      port@0:
         $ref: /schemas/graph.yaml#/properties/port
         description: Input of the DWC HDMI TX
         properties:
@@ -108,11 +111,14 @@  properties:
             description: Connection to the VOPB
           endpoint@1:
             description: Connection to the VOPL
-    properties:
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
         description: Output of the DWC HDMI TX

+    required:
+      - port@0
+      - port@1
+
   rockchip,grf:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -147,7 +153,11 @@  examples:
         clock-names = "iahb", "isfr";

         ports {
-            port {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
                 #address-cells = <1>;
                 #size-cells = <0>;

@@ -155,11 +165,20 @@  examples:
                     reg = <0>;
                     remote-endpoint = <&vopb_out_hdmi>;
                 };
+
                 hdmi_in_vopl: endpoint@1 {
                     reg = <1>;
                     remote-endpoint = <&vopl_out_hdmi>;
                 };
             };
+
+            port@1 {
+                reg = <1>;
+
+                hdmi_out_con: endpoint {
+                    remote-endpoint = <&hdmi_con_in>;
+                };
+            };
         };
     };