Skip to content

Commit

Permalink
dts: bindings: fix label properties for gpio-leds node
Browse files Browse the repository at this point in the history
This patch adds a label property to the GPIO LED parent node and fixes
the label property description of the child node. Indeed it is the label
of a parent node which can be used as device_get_binding() parameter to
retrieve the LED device, and not the one of a child node.

In addition, this patch sets both this properties as not required
because they are not.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
  • Loading branch information
simonguinot authored and carlescufi committed May 19, 2021
1 parent 0530ece commit 1adbe8b
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions dts/bindings/gpio/gpio-leds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,28 @@ description: GPIO LEDs parent node

compatible: "gpio-leds"

include:
- name: base.yaml
property-allowlist: [label]

properties:
label:
description: |
Human readable string describing the device and used to set the device
name. It can be passed as argument to device_get_binding() to retrieve
the device. If this property is omitted, then the device name is set
from the node full name.
child-binding:
description: GPIO LED child node
properties:
gpios:
type: phandle-array
required: true
label:
required: true
required: false
type: string
description: Human readable string describing the device (used as device_get_binding() argument)
description: |
Human readable string describing the LED. It can be used by an
application to identify this LED or to retrieve its number/index
(i.e. child node number) on the parent device.

0 comments on commit 1adbe8b

Please sign in to comment.