Commit 2228d9cf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Lee Jones:
 "New Support & Features:

   - Add support for the TI LP5812 4x3 matrix RGB LED driver, including
     autonomous animation engine control and extensive scan multiplexing
     modes

   - Add a new driver for the ams Osram AS3668 4-channel I2C LED
     controller

   - Extend the is31fl32xx driver to support the is31fl3293 variant,
     which features 3 channels and 12-bit PWM resolution

  Improvements & Fixes:

   - Prevent the ExpressWire KTD2801 chip from entering an undefined
     state by disabling interrupts during time-sensitive communication

   - Ensure the Qualcomm LPG driver detects hardware write failures by
     checking the return value of regmap_bulk_write() during LUT
     programming

   - Fix kernel-doc warnings in the lm3692x driver by documenting
     missing struct members and standardizing the comment style

   - Update the ExpressWire library to use fsleep() and unexport
     internal-only functions

   - Improve the is31fl32xx driver by reordering code to eliminate
     unnecessary forward declarations

  Cleanups & Refactoring:

   - Simplify the LP55XX common LED driver by utilizing the
     for_each_available_child_of_node_scoped() macro for more concise
     node iteration

  Device Tree Bindings Updates:

   - Add new YAML bindings for the TI LP5860 and LP5812 LED controllers,
     and the ams Osram AS3668

   - Convert the TI LM3697 white LED driver binding to DT schema format

   - Allow multicolor LED nodes to be named with numeric suffixes (e.g.,
     multi-led-0) to handle multiple instances without unit addresses

   - Document support for the PMH0101 variant in the Qualcomm LPG PWM
     and SPMI Flash LED bindings

   - Add the issi,is31fl3293 compatible string to the is31fl32xx
     binding"

* tag 'leds-next-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds:
  dt-bindings: leds: Convert ti,lm3697 to DT schema
  leds: as3668: Driver for the ams Osram 4-channel i2c LED driver
  dt-bindings: leds: Add new as3668 support
  docs: leds: Document TI LP5812 LED driver
  leds: Add basic support for TI/National Semiconductor LP5812 LED Driver
  leds: qcom-lpg: Check the return value of regmap_bulk_write()
  dt-bindings: leds: qcom,spmi-flash-led: Add PMH0101 compatible
  dt-bindings: leds: leds-qcom-lpg: Add support for PMH0101 PWM
  dt-bindings: leds: Allow differently named multicolor LEDs
  leds: lp55xx: Simplify with scoped for each OF child loop
  dt-bindings: leds: add TI/National Semiconductor LP5812 LED Driver
  leds: is31f132xx: Add support for is31fl3293
  leds: is31f132xx: Re-order code to remove forward declarations
  dt-bindings: leds: Add issi,is31fl3293 to leds-is31fl32xx
  leds: expresswire: Fix chip state breakage
  dt-bindings: leds: Add LP5860 LED controller
  leds: lm3692x: Fix kernel-doc for struct lm3692x_led
parents 4bfa4a54 b2c87f5e
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ams,as3668.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Osram 4-channel i2c LED driver

maintainers:
  - Lukas Timmermann <linux@timmermann.space>

description:
  This IC can drive up to four separate LEDs.
  Having four channels suggests it could be used with a single RGBW LED.

properties:
  compatible:
    const: ams,as3668

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^led@[0-3]$":
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false

    properties:
      reg:
        maxItems: 1

required:
  - compatible
  - reg
  - "#address-cells"
  - "#size-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/leds/common.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      led-controller@42 {
        compatible = "ams,as3668";
        reg = <0x42>;
        #address-cells = <1>;
        #size-cells = <0>;

        led@0 {
          reg = <0x0>;
          function = LED_FUNCTION_STATUS;
          color = <LED_COLOR_ID_RED>;
        };

        led@1 {
          reg = <0x1>;
          function = LED_FUNCTION_STATUS;
          color = <LED_COLOR_ID_GREEN>;
        };
      };
    };
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ description: |

properties:
  $nodename:
    pattern: "^multi-led(@[0-9a-f])?$"
    pattern: "^multi-led(@[0-9a-f]|-[0-9]+)?$"

  color:
    description: |
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ Required properties:
	issi,is31fl3235
	issi,is31fl3218
	issi,is31fl3216
	issi,is31fl3293
	si-en,sn3218
	si-en,sn3216
- reg: I2C slave address
+0 −73
Original line number Diff line number Diff line
* Texas Instruments - LM3697 Highly Efficient White LED Driver

The LM3697 11-bit LED driver provides high-
performance backlight dimming for 1, 2, or 3 series
LED strings while delivering up to 90% efficiency.

This device is suitable for display and keypad lighting

Required properties:
	- compatible:
		"ti,lm3697"
	- reg :  I2C slave address
	- #address-cells : 1
	- #size-cells : 0

Optional properties:
	- enable-gpios : GPIO pin to enable/disable the device
	- vled-supply : LED supply

Required child properties:
	- reg : 0 - LED is Controlled by bank A
		1 - LED is Controlled by bank B
	- led-sources : Indicates which HVLED string is associated to which
			control bank.  This is a zero based property so
			HVLED1 = 0, HVLED2 = 1, HVLED3 = 2.
			Additional information is contained
			in Documentation/devicetree/bindings/leds/common.txt

Optional child properties:
	- ti,brightness-resolution - see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- ramp-up-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- ramp-down-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- label : see Documentation/devicetree/bindings/leds/common.txt
	- linux,default-trigger :
	   see Documentation/devicetree/bindings/leds/common.txt

Example:

HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is
controlled by control bank B.

led-controller@36 {
	compatible = "ti,lm3697";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x36>;

	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
	vled-supply = <&vbatt>;

	led@0 {
		reg = <0>;
		led-sources = <0 2>;
		ti,brightness-resolution = <2047>;
		ramp-up-us = <5000>;
		ramp-down-us = <1000>;
		label = "white:first_backlight_cluster";
		linux,default-trigger = "backlight";
	};

	led@1 {
		reg = <1>;
		led-sources = <1>;
		ti,brightness-resolution = <255>;
		ramp-up-us = <500>;
		ramp-down-us = <1000>;
		label = "white:second_backlight_cluster";
		linux,default-trigger = "backlight";
	};
}

For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lm3697.pdf
+111 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-lp5860.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LED driver for LP5860 RGB LED from Texas Instruments.

maintainers:
  - Steffen Trumtrar <kernel@pengutronix.de>

description: |
  The LP5860 is multi-channel, I2C and SPI RGB LED Driver that can group RGB LEDs
  into a LED group or control them individually.

  For more product information please see the link below:
  https://www.ti.com/lit/ds/symlink/lp5860.pdf

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
    enum:
      - ti,lp5860

  reg:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

patternProperties:
  '^multi-led@[0-9a-f]+$':
    type: object
    $ref: leds-class-multicolor.yaml#
    unevaluatedProperties: false

    properties:
      reg:
        minimum: 0
        maximum: 198
        description:
          This property denotes the LED module number that is used
          for the child node.

      '#address-cells':
        const: 1

      '#size-cells':
        const: 0

    patternProperties:
      "^led@[0-9a-f]+$":
        type: object
        $ref: common.yaml#
        unevaluatedProperties: false

        properties:
          reg:
            maxItems: 1

        required:
          - reg

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/leds/common.h>

    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@0 {
            compatible = "ti,lp5860";
            reg = <0x0>;
            #address-cells = <1>;
            #size-cells = <0>;

            multi-led@0 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x0>;
                color = <LED_COLOR_ID_RGB>;

                led@0 {
                     reg = <0x0>;
                     color = <LED_COLOR_ID_RED>;
                };

                led@1 {
                     reg = <0x1>;
                     color = <LED_COLOR_ID_GREEN>;
                };

                led@2 {
                     reg = <0x2>;
                     color = <LED_COLOR_ID_BLUE>;
                };
            };
        };
    };
Loading