diff mbox series

[v2,1/2] media: dt-bindings: media: i2c: Add mono version to IMX290 bindings

Message ID 20230203191644.947643-2-dave.stevenson@raspberrypi.com
State New
Headers show
Series [v2,1/2] media: dt-bindings: media: i2c: Add mono version to IMX290 bindings | expand

Commit Message

Dave Stevenson Feb. 3, 2023, 7:16 p.m. UTC
The IMX290 module is available as either monochrome or colour and
the variant is not detectable at runtime.

Add a new compatible string for the monochrome version.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../bindings/media/i2c/sony,imx290.yaml          | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Comments

Laurent Pinchart Feb. 7, 2023, 1:06 a.m. UTC | #1
Hi Dave,

Thank you for the patch.

On Fri, Feb 03, 2023 at 07:16:43PM +0000, Dave Stevenson wrote:
> The IMX290 module is available as either monochrome or colour and
> the variant is not detectable at runtime.
> 
> Add a new compatible string for the monochrome version.
> 
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/media/i2c/sony,imx290.yaml          | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
> index 21377daae026..dacecb0cd9aa 100644
> --- a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
> @@ -12,15 +12,23 @@ maintainers:
>  
>  description: |-
>    The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
> -  Pixel for Color Cameras. It is programmable through I2C and 4-wire
> -  interfaces. The sensor output is available via CMOS logic parallel SDR
> -  output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
> -  bus is the default. No bindings have been defined for the other busses.
> +  Pixel, available in either mono or colour variants.
> +  It is programmable through I2C and 4-wire interfaces.
> +
> +  The sensor output is available via CMOS logic parallel SDR output, Low voltage
> +  LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the default.
> +  No bindings have been defined for the other busses.
> +
> +  imx290lqr is the full model identifier for the colour variant. "sony,imx290"
> +  is treated the same as this as it was the original compatible string.
> +  imx290llr is the mono version of the sensor.
>  
>  properties:
>    compatible:
>      enum:
>        - sony,imx290
> +      - sony,imx290lqr
> +      - sony,imx290llr

Let's mark the first one as deprecated:

properties:
  compatible:
    oneOf:
      - enum:
          - sony,imx290lqr # Colour
          - sony,imx290llr # Monochrome
      - const: sony,imx290
        deprecated: true

and update the example. I would then update the commit message to

  The IMX290 module is available as either monochrome or colour and
  the variant is not detectable at runtime.

  Add a new compatible string for the monochrome version, based on the
  full device name IMX290LLR. For consistency, add a new compatible
  string for the colour version based on the IMX290LQR full device name,
  and deprecate the current ambiguous compatible string.

With this,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>    reg:
>      maxItems: 1
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
index 21377daae026..dacecb0cd9aa 100644
--- a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
@@ -12,15 +12,23 @@  maintainers:
 
 description: |-
   The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
-  Pixel for Color Cameras. It is programmable through I2C and 4-wire
-  interfaces. The sensor output is available via CMOS logic parallel SDR
-  output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
-  bus is the default. No bindings have been defined for the other busses.
+  Pixel, available in either mono or colour variants.
+  It is programmable through I2C and 4-wire interfaces.
+
+  The sensor output is available via CMOS logic parallel SDR output, Low voltage
+  LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the default.
+  No bindings have been defined for the other busses.
+
+  imx290lqr is the full model identifier for the colour variant. "sony,imx290"
+  is treated the same as this as it was the original compatible string.
+  imx290llr is the mono version of the sensor.
 
 properties:
   compatible:
     enum:
       - sony,imx290
+      - sony,imx290lqr
+      - sony,imx290llr
 
   reg:
     maxItems: 1