lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dt-bindings: leds: Add missing (unevaluated|additional)Properties on child nodes
Hi!

> In order to ensure only documented properties are present, node schemas
> must have unevaluatedProperties or additionalProperties set to false
> (typically).
>
> Signed-off-by: Rob Herring <robh@kernel.org>

Patch does way more than that:

Can we get some explanation why that's correct?

Best regards,
Pavel

> index f8d7963c3a13..8b3b3bf1eaf2 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lgm.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-lgm.yaml
> @@ -56,7 +56,8 @@ properties:
>
> patternProperties:
> "^led@[0-2]$":
> - type: object
> + $ref: common.yaml#
> + unevaluatedProperties: false
>
> properties:
> reg:
> @@ -64,6 +65,9 @@ properties:
> minimum: 0
> maximum: 2
>
> + led-gpios:
> + maxItems: 1
> +
> intel,sso-hw-trigger:
> type: boolean
> description: This property indicates Hardware driven/control LED.
> @@ -118,14 +122,14 @@ examples:
> reg = <0>;
> function = "gphy";
> color = <LED_COLOR_ID_GREEN>;
> - led-gpio = <&ssogpio 0 0>;
> + led-gpios = <&ssogpio 0 0>;
> };
>
> led@2 {
> reg = <2>;
> function = LED_FUNCTION_POWER;
> color = <LED_COLOR_ID_GREEN>;
> - led-gpio = <&ssogpio 23 0>;
> + led-gpios = <&ssogpio 23 0>;
> };
> };
> };

--
People of Russia, stop Putin before his war on Ukraine escalates.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-08-23 21:35    [W:0.040 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site