leds-pwm-multicolor.yaml (1569B)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Multi-color LEDs connected to PWM 8 9maintainers: 10 - Sven Schwermer <sven.schwermer@disruptive-technologies.com> 11 12description: | 13 This driver combines several monochrome PWM LEDs into one multi-color 14 LED using the multicolor LED class. 15 16properties: 17 compatible: 18 const: pwm-leds-multicolor 19 20 multi-led: 21 type: object 22 23 patternProperties: 24 "^led-[0-9a-z]+$": 25 type: object 26 $ref: common.yaml# 27 28 additionalProperties: false 29 30 properties: 31 pwms: 32 maxItems: 1 33 34 pwm-names: true 35 36 color: true 37 38 required: 39 - pwms 40 - color 41 42required: 43 - compatible 44 45allOf: 46 - $ref: leds-class-multicolor.yaml# 47 48additionalProperties: false 49 50examples: 51 - | 52 #include <dt-bindings/leds/common.h> 53 54 led-controller { 55 compatible = "pwm-leds-multicolor"; 56 57 multi-led { 58 color = <LED_COLOR_ID_RGB>; 59 function = LED_FUNCTION_INDICATOR; 60 max-brightness = <65535>; 61 62 led-red { 63 pwms = <&pwm1 0 1000000>; 64 color = <LED_COLOR_ID_RED>; 65 }; 66 67 led-green { 68 pwms = <&pwm2 0 1000000>; 69 color = <LED_COLOR_ID_GREEN>; 70 }; 71 72 led-blue { 73 pwms = <&pwm3 0 1000000>; 74 color = <LED_COLOR_ID_BLUE>; 75 }; 76 }; 77 }; 78 79...