Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: leds: Convert leds-lm3692x to YAML format

Additional changes:

- Add ref to common.yaml for child node.
- Add I2C node at example.

Fix below warning:
arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dtb: /soc@0/bus@30800000/i2c@30a40000/backlight@36:
failed to match any schema with compatible: ['ti,lm36922']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240821222001.591111-1-Frank.Li@nxp.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Frank Li and committed by
Lee Jones
e5ae4083 4968f672

+110 -65
-65
Documentation/devicetree/bindings/leds/leds-lm3692x.txt
··· 1 - * Texas Instruments - LM3692x Highly Efficient White LED Driver 2 - 3 - The LM3692x is an ultra-compact, highly efficient, 4 - white-LED driver designed for LCD display backlighting. 5 - 6 - The main difference between the LM36922 and LM36923 is the number of 7 - LED strings it supports. The LM36922 supports two strings while the LM36923 8 - supports three strings. 9 - 10 - Required properties: 11 - - compatible: 12 - "ti,lm36922" 13 - "ti,lm36923" 14 - - reg : I2C slave address 15 - - #address-cells : 1 16 - - #size-cells : 0 17 - 18 - Optional properties: 19 - - enable-gpios : gpio pin to enable/disable the device. 20 - - vled-supply : LED supply 21 - - ti,ovp-microvolt: Overvoltage protection in 22 - micro-volt, can be 17000000, 21000000, 25000000 or 23 - 29000000. If ti,ovp-microvolt is not specified it 24 - defaults to 29000000. 25 - 26 - Required child properties: 27 - - reg : 0 - Will enable all LED sync paths 28 - 1 - Will enable the LED1 sync 29 - 2 - Will enable the LED2 sync 30 - 3 - Will enable the LED3 sync (LM36923 only) 31 - 32 - Optional child properties: 33 - - function : see Documentation/devicetree/bindings/leds/common.txt 34 - - color : see Documentation/devicetree/bindings/leds/common.txt 35 - - label : see Documentation/devicetree/bindings/leds/common.txt (deprecated) 36 - - linux,default-trigger : 37 - see Documentation/devicetree/bindings/leds/common.txt 38 - - led-max-microamp : 39 - see Documentation/devicetree/bindings/leds/common.txt 40 - 41 - Example: 42 - 43 - #include <dt-bindings/leds/common.h> 44 - 45 - led-controller@36 { 46 - compatible = "ti,lm3692x"; 47 - reg = <0x36>; 48 - #address-cells = <1>; 49 - #size-cells = <0>; 50 - 51 - enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 52 - vled-supply = <&vbatt>; 53 - ti,ovp-microvolt = <29000000>; 54 - 55 - led@0 { 56 - reg = <0>; 57 - function = LED_FUNCTION_BACKLIGHT; 58 - color = <LED_COLOR_ID_WHITE>; 59 - linux,default-trigger = "backlight"; 60 - led-max-microamp = <20000>; 61 - }; 62 - } 63 - 64 - For more product information please see the link below: 65 - https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
+110
Documentation/devicetree/bindings/leds/ti.lm36922.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/ti.lm36922.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments - LM3692x Highly Efficient White LED Driver 8 + 9 + maintainers: 10 + - Dan Murphy <dmurphy@ti.com> 11 + 12 + description: | 13 + The LM3692x is an ultra-compact, highly efficient, 14 + white-LED driver designed for LCD display backlighting. 15 + 16 + The main difference between the LM36922 and LM36923 is the number of 17 + LED strings it supports. The LM36922 supports two strings while the LM36923 18 + supports three strings. 19 + 20 + For more product information please see the link below: 21 + https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf 22 + 23 + properties: 24 + compatible: 25 + enum: 26 + - ti,lm36922 27 + - ti,lm36923 28 + 29 + reg: 30 + maxItems: 1 31 + 32 + "#address-cells": 33 + const: 1 34 + 35 + "#size-cells": 36 + const: 0 37 + 38 + enable-gpios: 39 + description: gpio pin to enable/disable the device. 40 + 41 + vled-supply: 42 + description: LED supply 43 + 44 + ti,ovp-microvolt: 45 + description: Overvoltage protection. 46 + default: 29000000 47 + enum: [17000000, 21000000, 25000000, 29000000] 48 + 49 + patternProperties: 50 + '^led@[0-3]$': 51 + type: object 52 + $ref: common.yaml 53 + properties: 54 + reg: 55 + enum: [0, 1, 2, 3] 56 + description: | 57 + 0 - Will enable all LED sync paths 58 + 1 - Will enable the LED1 sync 59 + 2 - Will enable the LED2 sync 60 + 3 - Will enable the LED3 sync (LM36923 only) 61 + 62 + unevaluatedProperties: false 63 + 64 + required: 65 + - compatible 66 + - reg 67 + - "#address-cells" 68 + - "#size-cells" 69 + 70 + allOf: 71 + - if: 72 + properties: 73 + compatible: 74 + contains: 75 + const: ti,lm36922 76 + then: 77 + properties: 78 + led@3: false 79 + 80 + additionalProperties: false 81 + 82 + examples: 83 + - | 84 + #include <dt-bindings/gpio/gpio.h> 85 + #include <dt-bindings/leds/common.h> 86 + 87 + i2c { 88 + #address-cells = <1>; 89 + #size-cells = <0>; 90 + 91 + led-controller@36 { 92 + compatible = "ti,lm36922"; 93 + reg = <0x36>; 94 + #address-cells = <1>; 95 + #size-cells = <0>; 96 + 97 + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 98 + vled-supply = <&vbatt>; 99 + ti,ovp-microvolt = <29000000>; 100 + 101 + led@0 { 102 + reg = <0>; 103 + function = LED_FUNCTION_BACKLIGHT; 104 + color = <LED_COLOR_ID_WHITE>; 105 + linux,default-trigger = "backlight"; 106 + led-max-microamp = <20000>; 107 + }; 108 + }; 109 + }; 110 +