diff mbox series

[03/13] dt-bindings: media: ov5640: Do not limit rotation

Message ID 20200717132859.237120-4-jacopo+renesas@jmondi.org (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series dt-bindings: media: ov5640: Convert to json-schema | expand

Commit Message

Jacopo Mondi July 17, 2020, 1:28 p.m. UTC
The 'rotation' property should not be limited to only support 0 and
180 degrees, as that limitation comes from the driver implementation
and not from any device specific constraint.

Remove the enumeration of supported values from 'rotation'.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart July 17, 2020, 7:38 p.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Fri, Jul 17, 2020 at 03:28:49PM +0200, Jacopo Mondi wrote:
> The 'rotation' property should not be limited to only support 0 and
> 180 degrees, as that limitation comes from the driver implementation
> and not from any device specific constraint.
> 
> Remove the enumeration of supported values from 'rotation'.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> index ceeacc91c801..503f8b78615c 100644
> --- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> @@ -55,7 +55,7 @@ properties:
>    rotation:
>      description: |
>        As defined in Documentation/devicetree/bindings/media/video-interfaces.txt
> -    enum: [0, 180]
> +    maxItems: 1

Maybe

    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 359

?

>  
>    port:
>      type: object
Rob Herring (Arm) July 20, 2020, 7:36 p.m. UTC | #2
On Fri, Jul 17, 2020 at 10:38:07PM +0300, Laurent Pinchart wrote:
> Hi Jacopo,
> 
> Thank you for the patch.
> 
> On Fri, Jul 17, 2020 at 03:28:49PM +0200, Jacopo Mondi wrote:
> > The 'rotation' property should not be limited to only support 0 and
> > 180 degrees, as that limitation comes from the driver implementation
> > and not from any device specific constraint.
> > 
> > Remove the enumeration of supported values from 'rotation'.
> > 
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > index ceeacc91c801..503f8b78615c 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > @@ -55,7 +55,7 @@ properties:
> >    rotation:
> >      description: |
> >        As defined in Documentation/devicetree/bindings/media/video-interfaces.txt
> > -    enum: [0, 180]
> > +    maxItems: 1

Not an array, so 'maxItems' doesn't make sense here.

> 
> Maybe
> 
>     $ref: /schemas/types.yaml#/definitions/uint32
>     minimum: 0
>     maximum: 359
> 
> ?

We should have a common definition and this binding just needs to define 
the specific constraints. If none, then just 'rotation: true'.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
index ceeacc91c801..503f8b78615c 100644
--- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
@@ -55,7 +55,7 @@  properties:
   rotation:
     description: |
       As defined in Documentation/devicetree/bindings/media/video-interfaces.txt
-    enum: [0, 180]
+    maxItems: 1
 
   port:
     type: object