devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Fabio Estevam <festevam@gmail.com>,
	martink@posteo.de
Subject: Re: [PATCH v3 2/7] media: dt-bindings: hynix,hi846: Restrict endpoint properties
Date: Mon, 2 Oct 2023 14:17:21 -0500	[thread overview]
Message-ID: <20231002191721.GB2351787-robh@kernel.org> (raw)
In-Reply-To: <20230930145951.23433-3-jacopo.mondi@ideasonboard.com>

On Sat, Sep 30, 2023 at 04:59:46PM +0200, Jacopo Mondi wrote:
> Only properties explicitly listed in the schema are accepted as
> endpoint properties.
> 
> Make sure this is actually enforced by setting 'additionalProperties'
> to false and explicitly allow 'remote-endpoint' in the list of
> endpoint properties.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml b/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> index 60f19e1152b3..f2ca86501d3c 100644
> --- a/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> @@ -58,7 +58,7 @@ properties:
>      properties:
>        endpoint:
>          $ref: /schemas/media/video-interfaces.yaml#
> -        unevaluatedProperties: false
> +        additionalProperties: false

If anything 'additionalProperties' is the exception and 
'unevaluatedProperties' is the rule. Just grep refs to 
video-interfaces.yaml. Why did you change this for just 
this 1 device? 

I'm more worried about undocumented properties than a documented 
property which makes no sense for the h/w being present. So I think 
as-is was fine.

>  
>          properties:
>            data-lanes:
> @@ -73,6 +73,7 @@ properties:
>                    - const: 2
>  
>            link-frequencies: true

I suppose we could remove this as it has no effect on the schema 
validation, but it's probably worthwhile to keep for documentation 
purposes.

Rob

> +          remote-endpoint: true
>  
>          required:
>            - data-lanes
> -- 
> 2.42.0
> 

  reply	other threads:[~2023-10-02 19:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30 14:59 [PATCH v3 0/7] media: bindings: Fix handling of video-interface-device Jacopo Mondi
2023-09-30 14:59 ` [PATCH v3 1/7] media: dt-bindings: hynix,hi846: Add video-interface-device properties Jacopo Mondi
2023-10-02 19:17   ` Rob Herring
2023-10-03  8:27   ` Sakari Ailus
2023-10-03  9:15     ` Laurent Pinchart
2023-09-30 14:59 ` [PATCH v3 2/7] media: dt-bindings: hynix,hi846: Restrict endpoint properties Jacopo Mondi
2023-10-02 19:17   ` Rob Herring [this message]
2023-09-30 14:59 ` [PATCH v3 3/7] media: dt-bindings: ovti,ov02a10: Fix handling of video-interface-device Jacopo Mondi
2023-10-02 19:17   ` Rob Herring
2023-09-30 14:59 ` [PATCH v3 4/7] media: dt-bindings: ovti,ov4689: " Jacopo Mondi
2023-10-02 19:18   ` Rob Herring
2023-09-30 14:59 ` [PATCH v3 5/7] media: dt-bindings: ovti,ov5640: " Jacopo Mondi
2023-10-02 19:18   ` Rob Herring
2023-09-30 14:59 ` [PATCH v3 6/7] media: dt-bindings: sony,imx214: " Jacopo Mondi
2023-10-02 19:18   ` Rob Herring
2023-09-30 14:59 ` [PATCH v3 7/7] media: dt-bindings: sony,imx415: " Jacopo Mondi
2023-10-02 19:07   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231002191721.GB2351787-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=martink@posteo.de \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).