From 44e1655a444fe7a1bd81994d34c6bbb5245b9e60 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 30 Jun 2020 14:01:11 -0600 Subject: dt-bindings: backlight: Convert common backlight bindings to DT schema Convert the common GPIO, LED, and PWM backlight bindings to DT schema format. Given there's only 2 common properties and the descriptions are slightly different, I opted to not create a common backlight schema. Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Sam Ravnborg Acked-by: Sam Ravnborg Link: https://lore.kernel.org/r/20200630200111.1170742-1-robh@kernel.org Signed-off-by: Rob Herring --- .../bindings/leds/backlight/led-backlight.yaml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml (limited to 'Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml') diff --git a/Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml new file mode 100644 index 000000000000..625082bf3892 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/led-backlight.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: led-backlight bindings + +maintainers: + - Lee Jones + - Daniel Thompson + - Jingoo Han + +description: + This binding is used to describe a basic backlight device made of LEDs. It + can also be used to describe a backlight device controlled by the output of + a LED driver. + +properties: + compatible: + const: led-backlight + + leds: + description: A list of LED nodes + $ref: /schemas/types.yaml#/definitions/phandle-array + + brightness-levels: + description: + Array of distinct brightness levels. The levels must be in the range + accepted by the underlying LED devices. This is used to translate a + backlight brightness level into a LED brightness level. If it is not + provided, the identity mapping is used. + $ref: /schemas/types.yaml#/definitions/uint32-array + + default-brightness-level: + description: + The default brightness level (index into the array defined by the + "brightness-levels" property). + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - leds + +additionalProperties: false + +examples: + - | + backlight { + compatible = "led-backlight"; + + leds = <&led1>, <&led2>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + }; + +... -- cgit v1.2.3