Skip to content

Commit

Permalink
dt-bindings: leds: Add missing references to common LED schema
Browse files Browse the repository at this point in the history
'led' nodes should have a reference to LED common.yaml schema. Add it where
missing and drop any duplicate properties.

Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221207204327.2810001-2-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Rob Herring committed Dec 12, 2022
1 parent 1211644 commit 580f989
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/leds/leds-lgm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ properties:

patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false

properties:
reg:
Expand Down
9 changes: 2 additions & 7 deletions Documentation/devicetree/bindings/leds/leds-max77650.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ properties:

patternProperties:
"^led@[0-2]$":
type: object
description: |
Properties for a single LED.
$ref: common.yaml#
unevaluatedProperties: false

properties:
reg:
Expand All @@ -41,10 +40,6 @@ patternProperties:
minimum: 0
maximum: 2

label: true

linux,default-trigger: true

required:
- compatible
- "#address-cells"
Expand Down
16 changes: 3 additions & 13 deletions Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,16 @@ properties:

patternProperties:
"^led-[1-2]$":
type: object
description:
Properties for a single LED.
$ref: common.yaml#
unevaluatedProperties: false

properties:
#allOf:
#- $ref: "common.yaml#"
rohm,led-compatible:
description: LED identification string
$ref: "/schemas/types.yaml#/definitions/string"
enum:
- bd71828-ambled
- bd71828-grnled
function:
description:
Purpose of LED as defined in dt-bindings/leds/common.h
$ref: "/schemas/types.yaml#/definitions/string"
color:
description:
LED colour as defined in dt-bindings/leds/common.h
$ref: "/schemas/types.yaml#/definitions/uint32"

required:
- compatible
Expand Down

0 comments on commit 580f989

Please sign in to comment.