Commit f2debe05 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Lee Jones:

 - Limited LED current based on thermal conditions in the QCOM flash LED
   driver

 - Fixed device child node usage in the BD2606MVV and PCA995x drivers

 - Used device_for_each_child_node_scoped() to access child nodes in the
   IS31FL319X driver

 - Reset the LED controller during the probe in the LM3601X driver

 - Used device_for_each_child_node() to access device child nodes in the
   PCA995X driver

 - Fixed CONFIG_LEDS_CLASS_MULTICOLOR dependency in the BlinkM driver

 - Replaced msleep() with usleep_range() in the SUN50I-A100 driver

 - Used scoped device node handling to simplify error paths in the
   AAT1290, KTD2692, and MC13783 drivers

 - Added missing of_node_get for probe duration in the MAX77693 driver

 - Simplified using for_each_available_child_of_node_scoped() loops when
   iterating over device nodes

 - Used devm_clk_get_enabled() helpers in the LP55XX driver

 - Converted DT bindings from TXT to YAML format for various drivers,
   including LM3692x and SC2731-BLTC

 - Set num_leds after allocation in the GPIO driver

 - Removed irrelevant blink configuration error message in the PCA9532
   driver

 - Fixed module autoloading with MODULE_DEVICE_TABLE() in the Turris
   Omnia driver

* tag 'leds-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (38 commits)
  leds: turris-omnia: Fix module autoloading with MODULE_DEVICE_TABLE()
  leds: pca9532: Remove irrelevant blink configuration error message
  leds: gpio: Set num_leds after allocation
  dt-bindings: leds: Convert leds-lm3692x to YAML format
  leds: lp55xx: Use devm_clk_get_enabled() helpers
  leds: as3645a: Use device_* to iterate over device child nodes
  leds: qcom-lpg: Simplify with scoped for each OF child loop
  leds: turris-omnia: Simplify with scoped for each OF child loop
  leds: sc27xx: Simplify with scoped for each OF child loop
  leds: pca9532: Simplify with scoped for each OF child loop
  leds: netxbig: Simplify with scoped for each OF child loop
  leds: mt6323: Simplify with scoped for each OF child loop
  leds: mc13783: Use scoped device node handling to simplify error paths
  leds: lp55xx: Simplify with scoped for each OF child loop
  leds: is31fl32xx: Simplify with scoped for each OF child loop
  leds: bcm6358: Simplify with scoped for each OF child loop
  leds: bcm6328: Simplify with scoped for each OF child loop
  leds: aw2013: Simplify with scoped for each OF child loop
  leds: 88pm860x: Simplify with scoped for each OF child loop
  leds: max77693: Simplify with scoped for each OF child loop
  ...
parents b0a53b4f 64c38866
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@ properties:
            # LED indicates NAND memory activity (deprecated),
            # in new implementations use "mtd"
          - nand-disk
            # LED indicates network activity
          - netdev
            # No trigger assigned to the LED. This is the default mode
            # if trigger is absent
          - none
+0 −65
Original line number Diff line number Diff line
* Texas Instruments - LM3692x Highly Efficient White LED Driver

The LM3692x is an ultra-compact, highly efficient,
white-LED driver designed for LCD display backlighting.

The main difference between the LM36922 and LM36923 is the number of
LED strings it supports.  The LM36922 supports two strings while the LM36923
supports three strings.

Required properties:
	- compatible:
		"ti,lm36922"
		"ti,lm36923"
	- 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
	- ti,ovp-microvolt: Overvoltage protection in
	    micro-volt, can be 17000000, 21000000, 25000000 or
	    29000000. If ti,ovp-microvolt is not specified it
	    defaults to 29000000.

Required child properties:
	- reg : 0 - Will enable all LED sync paths
		1 - Will enable the LED1 sync
		2 - Will enable the LED2 sync
		3 - Will enable the LED3 sync (LM36923 only)

Optional child properties:
	- function : see Documentation/devicetree/bindings/leds/common.txt
	- color : see Documentation/devicetree/bindings/leds/common.txt
	- label : see Documentation/devicetree/bindings/leds/common.txt (deprecated)
	- linux,default-trigger :
	   see Documentation/devicetree/bindings/leds/common.txt
	- led-max-microamp :
	   see Documentation/devicetree/bindings/leds/common.txt

Example:

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

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

	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
	vled-supply = <&vbatt>;
	ti,ovp-microvolt = <29000000>;

	led@0 {
		reg = <0>;
		function = LED_FUNCTION_BACKLIGHT;
		color = <LED_COLOR_ID_WHITE>;
		linux,default-trigger = "backlight";
		led-max-microamp = <20000>;
	};
}

For more product information please see the link below:
https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
+0 −43
Original line number Diff line number Diff line
LEDs connected to Spreadtrum SC27XX PMIC breathing light controller

The SC27xx breathing light controller supports to 3 outputs:
red LED, green LED and blue LED. Each LED can work at normal
PWM mode or breath light mode.

Required properties:
- compatible: Should be "sprd,sc2731-bltc".
- #address-cells: Must be 1.
- #size-cells: Must be 0.
- reg: Specify the controller address.

Required child properties:
- reg: Port this LED is connected to.

Optional child properties:
- function: See Documentation/devicetree/bindings/leds/common.txt.
- color: See Documentation/devicetree/bindings/leds/common.txt.
- label: See Documentation/devicetree/bindings/leds/common.txt (deprecated).

Examples:

led-controller@200 {
	compatible = "sprd,sc2731-bltc";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x200>;

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

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

	led@2 {
		color = <LED_COLOR_ID_BLUE>;
		reg = <0x2>;
	};
};
+4 −2
Original line number Diff line number Diff line
@@ -11,19 +11,21 @@ maintainers:
  - Marek Vasut <marex@denx.de>

description:
  The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C
  that can drive 16 separate lines. Each of them can be individually switched
  The NXP PCA995x family are programmable LED controllers connected via I2C
  that can drive separate lines. Each of them can be individually switched
  on and off, and brightness can be controlled via individual PWM.

  Datasheets are available at
  https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf
  https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf
  https://www.nxp.com/docs/en/data-sheet/PCA9956B.pdf

properties:
  compatible:
    enum:
      - nxp,pca9952
      - nxp,pca9955b
      - nxp,pca9956b

  reg:
    maxItems: 1
+84 −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/sprd,sc2731-bltc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Spreadtrum SC2731 PMIC breathing light controller

maintainers:
  - Orson Zhai <orsonzhai@gmail.com>
  - Baolin Wang <baolin.wang7@gmail.com>
  - Chunyan Zhang <zhang.lyra@gmail.com>

description: |
  The SC2731 breathing light controller supports up to 3 outputs:
  red LED, green LED and blue LED. Each LED can work at normal PWM mode
  or breath light mode.

properties:
  compatible:
    const: sprd,sc2731-bltc

  reg:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

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

    properties:
      reg:
        minimum: 0
        maximum: 2

    required:
      - reg

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

additionalProperties: false

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

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

      led-controller@200 {
        compatible = "sprd,sc2731-bltc";
        reg = <0x200>;
        #address-cells = <1>;
        #size-cells = <0>;

        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