zephyr/dts/bindings/led/led-controller.yaml
Simon Guinot 9d729acc37 dts: introduce binding for LED controllers
The led-controller DT binding gathers some common properties for LED
controllers and for the LED child nodes.

One notable property is "color-mapping" which allows to define a channel
to color mapping for multicolor LEDs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-08-28 15:04:35 +02:00

40 lines
1.3 KiB
YAML

# Copyright (c) 2020 Seagate Technology LLC
# SPDX-License-Identifier: Apache-2.0
# Common fields for LED controllers and child LEDs
properties:
label:
required: true
child-binding:
description: LED child node
properties:
label:
required: false
type: string
description: Human readable string describing the LED
index:
required: false
type: int
description: |
Index of the LED on a controller. It can be used by drivers or
applications to map a logical LED to its real position on the
controller. For example, this allows to handle boards where the
LEDs in an array/strip are not wired following the LED order of
the controller.
color-mapping:
type: array
required: false
description: |
Channel to color mapping of a multicolor LED. If a LED supports
several colors, then the color-mapping property can be used to
describe how the hardware channels and the colors are mapped.
For example the channel to color mapping of RGB LEDs would be
color-mapping =
<LED_COLOR_ID_RED>,
<LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_BLUE>;