* [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger
@ 2021-12-17 17:07 Thierry Reding
2021-12-17 17:07 ` [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema Thierry Reding
2021-12-21 19:39 ` [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Thierry Reding @ 2021-12-17 17:07 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring
Cc: Milo Kim, Jacek Anaszewski, dri-devel, linux-leds, devicetree
From: Thierry Reding <treding@nvidia.com>
LEDs can use rfkill events as a trigger source, so document these in the
device tree bindings.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
.../devicetree/bindings/leds/common.yaml | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 697102707703..f686907b4907 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -79,24 +79,25 @@ properties:
the LED.
$ref: /schemas/types.yaml#/definitions/string
- enum:
+ oneOf:
# LED will act as a back-light, controlled by the framebuffer system
- - backlight
+ - const: backlight
# LED will turn on (but for leds-gpio see "default-state" property in
# Documentation/devicetree/bindings/leds/leds-gpio.yaml)
- - default-on
+ - const: default-on
# LED "double" flashes at a load average based rate
- - heartbeat
+ - const: heartbeat
# LED indicates disk activity
- - disk-activity
+ - const: disk-activity
# LED indicates IDE disk activity (deprecated), in new implementations
# use "disk-activity"
- - ide-disk
+ - const: ide-disk
# LED flashes at a fixed, configurable rate
- - timer
+ - const: timer
# LED alters the brightness for the specified duration with one software
# timer (requires "led-pattern" property)
- - pattern
+ - const: pattern
+ - pattern: "^rfkill[0-9]+$"
led-pattern:
description: |
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema
2021-12-17 17:07 [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Thierry Reding
@ 2021-12-17 17:07 ` Thierry Reding
2021-12-21 19:41 ` Rob Herring
2021-12-21 19:39 ` [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2021-12-17 17:07 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring
Cc: Milo Kim, Jacek Anaszewski, dri-devel, linux-leds, devicetree
From: Thierry Reding <treding@nvidia.com>
Convert the Texas Instruments LP855x backlight device tree bindings from
the free-form text format to json-schema.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
.../bindings/leds/backlight/lp855x.txt | 72 ---------
.../bindings/leds/backlight/ti,lp8550.yaml | 151 ++++++++++++++++++
2 files changed, 151 insertions(+), 72 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x.txt
create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
diff --git a/Documentation/devicetree/bindings/leds/backlight/lp855x.txt b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
deleted file mode 100644
index 88f56641fc28..000000000000
--- a/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-lp855x bindings
-
-Required properties:
- - compatible: "ti,lp8550", "ti,lp8551", "ti,lp8552", "ti,lp8553",
- "ti,lp8555", "ti,lp8556", "ti,lp8557"
- - reg: I2C slave address (u8)
- - dev-ctrl: Value of DEVICE CONTROL register (u8). It depends on the device.
-
-Optional properties:
- - bl-name: Backlight device name (string)
- - init-brt: Initial value of backlight brightness (u8)
- - pwm-period: PWM period value. Set only PWM input mode used (u32)
- - rom-addr: Register address of ROM area to be updated (u8)
- - rom-val: Register value to be updated (u8)
- - power-supply: Regulator which controls the 3V rail
- - enable-supply: Regulator which controls the EN/VDDIO input
-
-Example:
-
- /* LP8555 */
- backlight@2c {
- compatible = "ti,lp8555";
- reg = <0x2c>;
-
- dev-ctrl = /bits/ 8 <0x00>;
- pwm-period = <10000>;
-
- /* 4V OV, 4 output LED0 string enabled */
- rom_14h {
- rom-addr = /bits/ 8 <0x14>;
- rom-val = /bits/ 8 <0xcf>;
- };
-
- /* Heavy smoothing, 24ms ramp time step */
- rom_15h {
- rom-addr = /bits/ 8 <0x15>;
- rom-val = /bits/ 8 <0xc7>;
- };
-
- /* 4 output LED1 string enabled */
- rom_19h {
- rom-addr = /bits/ 8 <0x19>;
- rom-val = /bits/ 8 <0x0f>;
- };
- };
-
- /* LP8556 */
- backlight@2c {
- compatible = "ti,lp8556";
- reg = <0x2c>;
-
- bl-name = "lcd-bl";
- dev-ctrl = /bits/ 8 <0x85>;
- init-brt = /bits/ 8 <0x10>;
- };
-
- /* LP8557 */
- backlight@2c {
- compatible = "ti,lp8557";
- reg = <0x2c>;
- enable-supply = <&backlight_vddio>;
- power-supply = <&backlight_vdd>;
-
- dev-ctrl = /bits/ 8 <0x41>;
- init-brt = /bits/ 8 <0x0a>;
-
- /* 4V OV, 4 output LED string enabled */
- rom_14h {
- rom-addr = /bits/ 8 <0x14>;
- rom-val = /bits/ 8 <0xcf>;
- };
- };
diff --git a/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml b/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
new file mode 100644
index 000000000000..412779a5462b
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
@@ -0,0 +1,151 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/backlight/ti,lp8550.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments LP855x family devicetree bindings
+
+maintainers:
+ - Milo Kim <milo.kim@ti.com>
+ - Rob Herring <robh+dt@kernel.org>
+
+properties:
+ compatible:
+ enum:
+ - ti,lp8550
+ - ti,lp8551
+ - ti,lp8552
+ - ti,lp8553
+ - ti,lp8555
+ - ti,lp8556
+ - ti,lp8557
+
+ reg:
+ maxItems: 1
+
+ dev-ctrl:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Value of DEVICE CONTROL register. It depends on the device.
+
+ bl-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Backlight device name
+
+ init-brt:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Initial value of backlight brightness
+
+ pwm-period:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: PWM period value. Set only PWM input mode used
+
+ pwm-names:
+ maxItems: 1
+
+ pwms:
+ maxItems: 1
+
+ power-supply:
+ description: Regulator which controls the 3V rail
+
+ enable-supply:
+ description: Regulator which controls the EN/VDDIO input
+
+patternProperties:
+ '^rom_[0-9a-f]{2}h$':
+ type: object
+ properties:
+ rom-addr:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Register address of ROM area to be updated
+
+ rom-val:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Register value to be updated
+
+ additionalProperties: false
+
+ required:
+ - rom-addr
+ - rom-val
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - dev-ctrl
+
+examples:
+ # LP8555
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@2c {
+ compatible = "ti,lp8555";
+ reg = <0x2c>;
+
+ dev-ctrl = /bits/ 8 <0x00>;
+ pwm-period = <10000>;
+
+ /* 4V OV, 4 output LED0 string enabled */
+ rom_14h {
+ rom-addr = /bits/ 8 <0x14>;
+ rom-val = /bits/ 8 <0xcf>;
+ };
+
+ /* Heavy smoothing, 24ms ramp time step */
+ rom_15h {
+ rom-addr = /bits/ 8 <0x15>;
+ rom-val = /bits/ 8 <0xc7>;
+ };
+
+ /* 4 output LED1 string enabled */
+ rom_19h {
+ rom-addr = /bits/ 8 <0x19>;
+ rom-val = /bits/ 8 <0x0f>;
+ };
+ };
+ };
+
+ # LP8556
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@2c {
+ compatible = "ti,lp8556";
+ reg = <0x2c>;
+
+ bl-name = "lcd-bl";
+ dev-ctrl = /bits/ 8 <0x85>;
+ init-brt = /bits/ 8 <0x10>;
+ };
+ };
+
+ # LP8557
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@2c {
+ compatible = "ti,lp8557";
+ reg = <0x2c>;
+ enable-supply = <&backlight_vddio>;
+ power-supply = <&backlight_vdd>;
+
+ dev-ctrl = /bits/ 8 <0x41>;
+ init-brt = /bits/ 8 <0x0a>;
+
+ /* 4V OV, 4 output LED string enabled */
+ rom_14h {
+ rom-addr = /bits/ 8 <0x14>;
+ rom-val = /bits/ 8 <0xcf>;
+ };
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger
2021-12-17 17:07 [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Thierry Reding
2021-12-17 17:07 ` [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema Thierry Reding
@ 2021-12-21 19:39 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-21 19:39 UTC (permalink / raw)
To: Thierry Reding
Cc: Pavel Machek, Jingoo Han, Rob Herring, devicetree, dri-devel,
Milo Kim, Lee Jones, linux-leds, Jacek Anaszewski,
Daniel Thompson
On Fri, 17 Dec 2021 18:07:14 +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> LEDs can use rfkill events as a trigger source, so document these in the
> device tree bindings.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> .../devicetree/bindings/leds/common.yaml | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema
2021-12-17 17:07 ` [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema Thierry Reding
@ 2021-12-21 19:41 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-21 19:41 UTC (permalink / raw)
To: Thierry Reding
Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Milo Kim,
Jacek Anaszewski, dri-devel, linux-leds, devicetree
On Fri, Dec 17, 2021 at 06:07:15PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Convert the Texas Instruments LP855x backlight device tree bindings from
> the free-form text format to json-schema.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> .../bindings/leds/backlight/lp855x.txt | 72 ---------
> .../bindings/leds/backlight/ti,lp8550.yaml | 151 ++++++++++++++++++
> 2 files changed, 151 insertions(+), 72 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x.txt
> create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/backlight/lp855x.txt b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
> deleted file mode 100644
> index 88f56641fc28..000000000000
> --- a/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -lp855x bindings
> -
> -Required properties:
> - - compatible: "ti,lp8550", "ti,lp8551", "ti,lp8552", "ti,lp8553",
> - "ti,lp8555", "ti,lp8556", "ti,lp8557"
> - - reg: I2C slave address (u8)
> - - dev-ctrl: Value of DEVICE CONTROL register (u8). It depends on the device.
> -
> -Optional properties:
> - - bl-name: Backlight device name (string)
> - - init-brt: Initial value of backlight brightness (u8)
> - - pwm-period: PWM period value. Set only PWM input mode used (u32)
> - - rom-addr: Register address of ROM area to be updated (u8)
> - - rom-val: Register value to be updated (u8)
> - - power-supply: Regulator which controls the 3V rail
> - - enable-supply: Regulator which controls the EN/VDDIO input
> -
> -Example:
> -
> - /* LP8555 */
> - backlight@2c {
> - compatible = "ti,lp8555";
> - reg = <0x2c>;
> -
> - dev-ctrl = /bits/ 8 <0x00>;
> - pwm-period = <10000>;
> -
> - /* 4V OV, 4 output LED0 string enabled */
> - rom_14h {
> - rom-addr = /bits/ 8 <0x14>;
> - rom-val = /bits/ 8 <0xcf>;
> - };
> -
> - /* Heavy smoothing, 24ms ramp time step */
> - rom_15h {
> - rom-addr = /bits/ 8 <0x15>;
> - rom-val = /bits/ 8 <0xc7>;
> - };
> -
> - /* 4 output LED1 string enabled */
> - rom_19h {
> - rom-addr = /bits/ 8 <0x19>;
> - rom-val = /bits/ 8 <0x0f>;
> - };
> - };
> -
> - /* LP8556 */
> - backlight@2c {
> - compatible = "ti,lp8556";
> - reg = <0x2c>;
> -
> - bl-name = "lcd-bl";
> - dev-ctrl = /bits/ 8 <0x85>;
> - init-brt = /bits/ 8 <0x10>;
> - };
> -
> - /* LP8557 */
> - backlight@2c {
> - compatible = "ti,lp8557";
> - reg = <0x2c>;
> - enable-supply = <&backlight_vddio>;
> - power-supply = <&backlight_vdd>;
> -
> - dev-ctrl = /bits/ 8 <0x41>;
> - init-brt = /bits/ 8 <0x0a>;
> -
> - /* 4V OV, 4 output LED string enabled */
> - rom_14h {
> - rom-addr = /bits/ 8 <0x14>;
> - rom-val = /bits/ 8 <0xcf>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml b/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
> new file mode 100644
> index 000000000000..412779a5462b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/ti,lp8550.yaml
> @@ -0,0 +1,151 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/backlight/ti,lp8550.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments LP855x family devicetree bindings
> +
> +maintainers:
> + - Milo Kim <milo.kim@ti.com>
> + - Rob Herring <robh+dt@kernel.org>
I don't know anything about this h/w.
> +
> +properties:
> + compatible:
> + enum:
> + - ti,lp8550
> + - ti,lp8551
> + - ti,lp8552
> + - ti,lp8553
> + - ti,lp8555
> + - ti,lp8556
> + - ti,lp8557
> +
> + reg:
> + maxItems: 1
> +
> + dev-ctrl:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Value of DEVICE CONTROL register. It depends on the device.
> +
> + bl-name:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: Backlight device name
> +
> + init-brt:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Initial value of backlight brightness
> +
> + pwm-period:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: PWM period value. Set only PWM input mode used
> +
> + pwm-names:
> + maxItems: 1
> +
> + pwms:
> + maxItems: 1
> +
> + power-supply:
> + description: Regulator which controls the 3V rail
> +
> + enable-supply:
> + description: Regulator which controls the EN/VDDIO input
> +
> +patternProperties:
> + '^rom_[0-9a-f]{2}h$':
> + type: object
> + properties:
> + rom-addr:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Register address of ROM area to be updated
> +
> + rom-val:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Register value to be updated
> +
> + additionalProperties: false
> +
> + required:
> + - rom-addr
> + - rom-val
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - dev-ctrl
> +
> +examples:
> + # LP8555
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + backlight@2c {
> + compatible = "ti,lp8555";
> + reg = <0x2c>;
> +
> + dev-ctrl = /bits/ 8 <0x00>;
> + pwm-period = <10000>;
> +
> + /* 4V OV, 4 output LED0 string enabled */
> + rom_14h {
> + rom-addr = /bits/ 8 <0x14>;
> + rom-val = /bits/ 8 <0xcf>;
> + };
> +
> + /* Heavy smoothing, 24ms ramp time step */
> + rom_15h {
> + rom-addr = /bits/ 8 <0x15>;
> + rom-val = /bits/ 8 <0xc7>;
> + };
> +
> + /* 4 output LED1 string enabled */
> + rom_19h {
> + rom-addr = /bits/ 8 <0x19>;
> + rom-val = /bits/ 8 <0x0f>;
> + };
> + };
> + };
> +
> + # LP8556
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + backlight@2c {
> + compatible = "ti,lp8556";
> + reg = <0x2c>;
> +
> + bl-name = "lcd-bl";
> + dev-ctrl = /bits/ 8 <0x85>;
> + init-brt = /bits/ 8 <0x10>;
> + };
> + };
> +
> + # LP8557
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + backlight@2c {
> + compatible = "ti,lp8557";
> + reg = <0x2c>;
> + enable-supply = <&backlight_vddio>;
> + power-supply = <&backlight_vdd>;
> +
> + dev-ctrl = /bits/ 8 <0x41>;
> + init-brt = /bits/ 8 <0x0a>;
> +
> + /* 4V OV, 4 output LED string enabled */
> + rom_14h {
> + rom-addr = /bits/ 8 <0x14>;
> + rom-val = /bits/ 8 <0xcf>;
> + };
> + };
> + };
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-21 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 17:07 [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Thierry Reding
2021-12-17 17:07 ` [PATCH 2/2] dt-bindings: leds: lp855x: Convert to json-schema Thierry Reding
2021-12-21 19:41 ` Rob Herring
2021-12-21 19:39 ` [PATCH 1/2] dt-bindings: leds: Document rfkill* trigger Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).