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

dt-bindings: backlight: lp855x: Convert to YAML and modernize

Notable changes:
- ROM child nodes use dashes instead of underscores; the driver
reads all child nodes regardless of their names, so this doesn't
break ABI.
- pwm-period argument is deprecated, as it effectively duplicates
the period value provided in pwms. The driver continues to accept
the property, so this should not break ABI.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230519180728.2281-2-aweber.kernel@gmail.com

authored by

Artur Weber and committed by
Lee Jones
24b8ae3e a8b09e6f

+149 -72
+149
Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/backlight/lp855x-backlight.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments LP855X backlight controllers 8 + 9 + maintainers: 10 + - Artur Weber <aweber.kernel@gmail.com> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - ti,lp8550 16 + - ti,lp8551 17 + - ti,lp8552 18 + - ti,lp8553 19 + - ti,lp8555 20 + - ti,lp8556 21 + - ti,lp8557 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + dev-ctrl: 27 + $ref: /schemas/types.yaml#/definitions/uint8 28 + description: 29 + Value of device control register. This is a device-specific value. 30 + 31 + bl-name: 32 + $ref: /schemas/types.yaml#/definitions/string 33 + description: Backlight device name. 34 + 35 + init-brt: 36 + $ref: /schemas/types.yaml#/definitions/uint8 37 + description: Initial value of backlight brightness. 38 + 39 + power-supply: 40 + description: Regulator which controls the 3V rail. 41 + 42 + enable-supply: 43 + description: Regulator which controls the EN/VDDIO input. 44 + 45 + pwms: 46 + maxItems: 1 47 + description: | 48 + PWM channel to use for controlling the backlight; setting this 49 + enables the PWM-based backlight control mode. 50 + 51 + pwm-names: true 52 + 53 + pwm-period: 54 + $ref: /schemas/types.yaml#/definitions/uint32 55 + description: 56 + PWM period value. Deprecated; set the period value in the pwms 57 + property instead. 58 + deprecated: true 59 + 60 + patternProperties: 61 + "^rom-[0-9a-f]{2}h$": 62 + type: object 63 + description: Nodes containing the values of configuration registers. 64 + additionalProperties: false 65 + properties: 66 + rom-addr: 67 + $ref: /schemas/types.yaml#/definitions/uint8 68 + description: Register address of ROM area to be updated. 69 + 70 + rom-val: 71 + $ref: /schemas/types.yaml#/definitions/uint8 72 + description: Value to write to the ROM register. 73 + 74 + required: 75 + - compatible 76 + - reg 77 + - dev-ctrl 78 + 79 + unevaluatedProperties: false 80 + 81 + examples: 82 + - | 83 + i2c { 84 + #address-cells = <1>; 85 + #size-cells = <0>; 86 + 87 + backlight@2c { 88 + compatible = "ti,lp8555"; 89 + reg = <0x2c>; 90 + 91 + dev-ctrl = /bits/ 8 <0x00>; 92 + 93 + pwms = <&pwm 0 10000>; 94 + pwm-names = "lp8555"; 95 + 96 + /* 4V OV, 4 output LED0 string enabled */ 97 + rom-14h { 98 + rom-addr = /bits/ 8 <0x14>; 99 + rom-val = /bits/ 8 <0xcf>; 100 + }; 101 + 102 + /* Heavy smoothing, 24ms ramp time step */ 103 + rom-15h { 104 + rom-addr = /bits/ 8 <0x15>; 105 + rom-val = /bits/ 8 <0xc7>; 106 + }; 107 + 108 + /* 4 output LED1 string enabled */ 109 + rom-19h { 110 + rom-addr = /bits/ 8 <0x19>; 111 + rom-val = /bits/ 8 <0x0f>; 112 + }; 113 + }; 114 + }; 115 + - | 116 + i2c { 117 + #address-cells = <1>; 118 + #size-cells = <0>; 119 + 120 + backlight@2c { 121 + compatible = "ti,lp8556"; 122 + reg = <0x2c>; 123 + 124 + bl-name = "lcd-bl"; 125 + dev-ctrl = /bits/ 8 <0x85>; 126 + init-brt = /bits/ 8 <0x10>; 127 + }; 128 + }; 129 + - | 130 + i2c { 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + 134 + backlight@2c { 135 + compatible = "ti,lp8557"; 136 + reg = <0x2c>; 137 + enable-supply = <&backlight_vddio>; 138 + power-supply = <&backlight_vdd>; 139 + 140 + dev-ctrl = /bits/ 8 <0x41>; 141 + init-brt = /bits/ 8 <0x0a>; 142 + 143 + /* 4V OV, 4 output LED string enabled */ 144 + rom-14h { 145 + rom-addr = /bits/ 8 <0x14>; 146 + rom-val = /bits/ 8 <0xcf>; 147 + }; 148 + }; 149 + };
-72
Documentation/devicetree/bindings/leds/backlight/lp855x.txt
··· 1 - lp855x bindings 2 - 3 - Required properties: 4 - - compatible: "ti,lp8550", "ti,lp8551", "ti,lp8552", "ti,lp8553", 5 - "ti,lp8555", "ti,lp8556", "ti,lp8557" 6 - - reg: I2C slave address (u8) 7 - - dev-ctrl: Value of DEVICE CONTROL register (u8). It depends on the device. 8 - 9 - Optional properties: 10 - - bl-name: Backlight device name (string) 11 - - init-brt: Initial value of backlight brightness (u8) 12 - - pwm-period: PWM period value. Set only PWM input mode used (u32) 13 - - rom-addr: Register address of ROM area to be updated (u8) 14 - - rom-val: Register value to be updated (u8) 15 - - power-supply: Regulator which controls the 3V rail 16 - - enable-supply: Regulator which controls the EN/VDDIO input 17 - 18 - Example: 19 - 20 - /* LP8555 */ 21 - backlight@2c { 22 - compatible = "ti,lp8555"; 23 - reg = <0x2c>; 24 - 25 - dev-ctrl = /bits/ 8 <0x00>; 26 - pwm-period = <10000>; 27 - 28 - /* 4V OV, 4 output LED0 string enabled */ 29 - rom_14h { 30 - rom-addr = /bits/ 8 <0x14>; 31 - rom-val = /bits/ 8 <0xcf>; 32 - }; 33 - 34 - /* Heavy smoothing, 24ms ramp time step */ 35 - rom_15h { 36 - rom-addr = /bits/ 8 <0x15>; 37 - rom-val = /bits/ 8 <0xc7>; 38 - }; 39 - 40 - /* 4 output LED1 string enabled */ 41 - rom_19h { 42 - rom-addr = /bits/ 8 <0x19>; 43 - rom-val = /bits/ 8 <0x0f>; 44 - }; 45 - }; 46 - 47 - /* LP8556 */ 48 - backlight@2c { 49 - compatible = "ti,lp8556"; 50 - reg = <0x2c>; 51 - 52 - bl-name = "lcd-bl"; 53 - dev-ctrl = /bits/ 8 <0x85>; 54 - init-brt = /bits/ 8 <0x10>; 55 - }; 56 - 57 - /* LP8557 */ 58 - backlight@2c { 59 - compatible = "ti,lp8557"; 60 - reg = <0x2c>; 61 - enable-supply = <&backlight_vddio>; 62 - power-supply = <&backlight_vdd>; 63 - 64 - dev-ctrl = /bits/ 8 <0x41>; 65 - init-brt = /bits/ 8 <0x0a>; 66 - 67 - /* 4V OV, 4 output LED string enabled */ 68 - rom_14h { 69 - rom-addr = /bits/ 8 <0x14>; 70 - rom-val = /bits/ 8 <0xcf>; 71 - }; 72 - };