diff mbox series

[v14,1/2] media: dt-bindings: imx-jpeg: Add compatible for i.MX8QM JPEG codec

Message ID 20210619143611.17280-2-mirela.rabulea@oss.nxp.com (mailing list archive)
State New, archived
Headers show
Series Add dts and bindings update for i.MX8QM/QXP JPEG codec | expand

Commit Message

Mirela Rabulea OSS June 19, 2021, 2:36 p.m. UTC
From: Mirela Rabulea <mirela.rabulea@nxp.com>

Add two more compatibles: "nxp,imx8qm-jpgdec" and " nxp,imx8qm-jpgenc".
Also update the compatible property to ensure mutually exclusive usage of
encoder and decoder compatibles.
Update examples.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
---
Changes in v14:
  Address feedback from Aisheng Dong, do not use anyOf

 .../bindings/media/nxp,imx8-jpeg.yaml         | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

Comments

Aisheng Dong June 21, 2021, 3:46 a.m. UTC | #1
> From: Mirela Rabulea (OSS) <mirela.rabulea@oss.nxp.com>
> Sent: Saturday, June 19, 2021 10:36 PM
> Subject: [PATCH v14 1/2] media: dt-bindings: imx-jpeg: Add compatible for
> i.MX8QM JPEG codec

Nitpick: we usually put dt-bindings first.
e.g.
dt-bindings: media: xxx

Anyway it's small problem, so:

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng

> 
> Add two more compatibles: "nxp,imx8qm-jpgdec" and " nxp,imx8qm-jpgenc".
> Also update the compatible property to ensure mutually exclusive usage of
> encoder and decoder compatibles.
> Update examples.
> 
> Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
> ---
> Changes in v14:
>   Address feedback from Aisheng Dong, do not use anyOf
> 
>  .../bindings/media/nxp,imx8-jpeg.yaml         | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> index 5d13cbb5251b..3cc6f42aeb76 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> @@ -16,12 +16,17 @@ description: |-
> 
>  properties:
>    compatible:
> -    items:
> -      - enum:
> -            # JPEG decoder
> -          - nxp,imx8qxp-jpgdec
> -            # JPEG encoder
> -          - nxp,imx8qxp-jpgenc
> +    oneOf:
> +      - items:
> +          enum:
> +            - nxp,imx8qxp-jpgdec
> +            - nxp,imx8qxp-jpgenc
> +      - items:
> +          - const: nxp,imx8qm-jpgdec
> +          - const: nxp,imx8qxp-jpgdec
> +      - items:
> +          - const: nxp,imx8qm-jpgenc
> +          - const: nxp,imx8qxp-jpgenc
> 
>    reg:
>      maxItems: 1
> @@ -69,7 +74,7 @@ examples:
>      };
> 
>      jpegenc: jpegenc@58450000 {
> -        compatible = "nxp,imx8qxp-jpgenc";
> +        compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
>          reg = <0x58450000 0x00050000 >;
>          interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
>                       <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
> --
> 2.17.1
Rob Herring July 12, 2021, 8:13 p.m. UTC | #2
On Sat, 19 Jun 2021 17:36:10 +0300, Mirela Rabulea (OSS) wrote:
> From: Mirela Rabulea <mirela.rabulea@nxp.com>
> 
> Add two more compatibles: "nxp,imx8qm-jpgdec" and " nxp,imx8qm-jpgenc".
> Also update the compatible property to ensure mutually exclusive usage of
> encoder and decoder compatibles.
> Update examples.
> 
> Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
> ---
> Changes in v14:
>   Address feedback from Aisheng Dong, do not use anyOf
> 
>  .../bindings/media/nxp,imx8-jpeg.yaml         | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
index 5d13cbb5251b..3cc6f42aeb76 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
@@ -16,12 +16,17 @@  description: |-
 
 properties:
   compatible:
-    items:
-      - enum:
-            # JPEG decoder
-          - nxp,imx8qxp-jpgdec
-            # JPEG encoder
-          - nxp,imx8qxp-jpgenc
+    oneOf:
+      - items:
+          enum:
+            - nxp,imx8qxp-jpgdec
+            - nxp,imx8qxp-jpgenc
+      - items:
+          - const: nxp,imx8qm-jpgdec
+          - const: nxp,imx8qxp-jpgdec
+      - items:
+          - const: nxp,imx8qm-jpgenc
+          - const: nxp,imx8qxp-jpgenc
 
   reg:
     maxItems: 1
@@ -69,7 +74,7 @@  examples:
     };
 
     jpegenc: jpegenc@58450000 {
-        compatible = "nxp,imx8qxp-jpgenc";
+        compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
         reg = <0x58450000 0x00050000 >;
         interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
                      <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,