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

 - pca955x: Add HW blink support, utilizing PWM0. It supports one
   frequency across all blinking LEDs and falls back to software blink
   if different frequencies are requested.

 - trigger: netdev: Allow configuring LED blink interval via .blink_set
   even when HW offload (.hw_control) is enabled.

 - led-core: Fix a race condition where a quick LED_OFF followed by
   another brightness set could leave the LED off incorrectly,
   especially noticeable after the introduction of the ordered
   workqueue.

 - qcom-lpg: Add support for 6-bit PWM resolution alongside the existing
   9-bit support.

 - qcom-lpg: Fix PWM value capping to respect the selected resolution
   (6-bit or 9-bit) for normal PWMs.

 - qcom-lpg: Fix PWM value capping to respect the selected resolution
   for Hi-Res PWMs.

 - qcom-lpg: Fix calculation of the best period for Hi-Res PWMs to
   prevent requested duty cycles from exceeding the maximum allowed by
   the selected resolution.

 - st1202: Add a check for the error code returned by devm_mutex_init().

 - pwm-multicolor: Add a check for the return value of
   fwnode_property_read_u32().

 - st1202: Ensure hardware initialization (st1202_setup) happens before
   DT node processing (st1202_dt_init).

 - Kconfig: leds-st1202: Add select LEDS_TRIGGER_PATTERN as it's
   required by the driver.

 - lp8860: Drop unneeded explicit assignment to REGCACHE_NONE.

 - pca955x: Refactor code with helper functions and rename some
   functions/variables for clarity.

 - pca955x: Pass driver data pointers instead of the I2C client to
   helper functions.

 - pca955x: Optimize probe LED selection logic to reduce I2C operations.

 - pca955x: Revert the removal of pca95xx_num_led_regs() (renaming it to
   pca955x_num_led_regs) as it's needed for HW blink support.

 - st1202: Refactor st1202_led_set() to use the !! operator for boolean
   conversion.

 - st1202: Minor spacing and proofreading edits in comments.

 - Directory Rename: Rename the drivers/leds/simple directory to
   drivers/leds/simatic as the drivers within are not simple.

 - mlxcpld: Remove unused include of acpi.h.

 - nic78bx: Tidy up the ACPI ID table (remove ACPI_PTR, use
   mod_devicetable.h, remove explicit driver_data initializer).

 - tlc591xx: Convert text binding to YAML format, add child node
   constraints, and fix typos/formatting in the example.

 - qcom-lpg: Document the qcom,pm8937-pwm compatible string as a
   fallback for qcom,pm8916-pwm.

* tag 'leds-next-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (23 commits)
  leds: nic78bx: Tidy up ACPI ID table
  leds: mlxcpld: Remove unused ACPI header inclusion
  leds: rgb: leds-qcom-lpg: Fix calculation of best period Hi-Res PWMs
  leds: rgb: leds-qcom-lpg: Fix pwm resolution max for Hi-Res PWMs
  leds: rgb: leds-qcom-lpg: Fix pwm resolution max for normal PWMs
  leds: Rename simple directory to simatic
  leds: Kconfig: leds-st1202: Add select for required LEDS_TRIGGER_PATTERN
  leds: leds-st1202: Spacing and proofreading editing
  leds: leds-st1202: Initialize hardware before DT node child operations
  leds: pwm-multicolor: Add check for fwnode_property_read_u32
  leds: rgb: leds-qcom-lpg: Add support for 6-bit PWM resolution
  leds: Fix LED_OFF brightness race
  Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
  leds: st1202: Refactor st1202_led_set() to use !! operator for boolean conversion
  dt-bindings: leds: qcom-lpg: Document PM8937 PWM compatible
  leds: pca955x: Add HW blink support
  leds: pca955x: Optimize probe LED selection
  leds: pca955x: Use pointers to driver data rather than I2C client
  leds: pca955x: Refactor with helper functions and renaming
  dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
  ...
parents dcab75a3 161e3bea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ properties:
          - enum:
              - qcom,pm8550-pwm
          - const: qcom,pm8350c-pwm
      - items:
          - enum:
              - qcom,pm8937-pwm
          - const: qcom,pm8916-pwm

  "#pwm-cells":
    const: 2
+0 −40
Original line number Diff line number Diff line
LEDs connected to tlc59116 or tlc59108

Required properties
- compatible: should be "ti,tlc59116" or "ti,tlc59108"
- #address-cells: must be 1
- #size-cells: must be 0
- reg: typically 0x68

Each led is represented as a sub-node of the ti,tlc59116.
See Documentation/devicetree/bindings/leds/common.txt

LED sub-node properties:
- reg: number of LED line, 0 to 15 or 0 to 7
- label: (optional) name of LED
- linux,default-trigger : (optional)

Examples:

tlc59116@68 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "ti,tlc59116";
	reg = <0x68>;

	wan@0 {
		label = "wrt1900ac:amber:wan";
		reg = <0x0>;
	};

	2g@2 {
		label = "wrt1900ac:white:2g";
		reg = <0x2>;
	};

	alive@9 {
		label = "wrt1900ac:green:alive";
		reg = <0x9>;
		linux,default_trigger = "heartbeat";
	};
};
+90 −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/ti,tlc59116.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LEDs connected to tlc59116 or tlc59108

maintainers:
  - Andrew Lunn <andrew@lunn.ch>

properties:
  compatible:
    enum:
      - ti,tlc59108
      - ti,tlc59116

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^led@[0-9a-f]$":
    type: object
    $ref: common.yaml#
    properties:
      reg:
        items:
          minimum: 0
          maximum: 15

    unevaluatedProperties: false

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

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: ti,tlc59108
    then:
      patternProperties:
        "^led@[0-9a-f]$":
          properties:
            reg:
              items:
                maximum: 7

additionalProperties: false

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

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

            led@0 {
                reg = <0x0>;
                label = "wrt1900ac:amber:wan";
            };

            led@2 {
                reg = <0x2>;
                label = "wrt1900ac:white:2g";
            };

            led@9 {
                reg = <0x9>;
                label = "wrt1900ac:green:alive";
                linux,default-trigger = "heartbeat";
            };
        };
    };
+5 −3
Original line number Diff line number Diff line
@@ -932,7 +932,8 @@ config LEDS_USER
config LEDS_NIC78BX
	tristate "LED support for NI PXI NIC78bx devices"
	depends on LEDS_CLASS
	depends on X86 && ACPI
	depends on HAS_IOPORT
	depends on X86 || COMPILE_TEST
	help
	  This option enables support for the User1 and User2 LEDs on NI
	  PXI NIC78bx devices.
@@ -979,6 +980,7 @@ config LEDS_ST1202
	depends on I2C
	depends on OF
	select LEDS_TRIGGERS
	select LEDS_TRIGGER_PATTERN
	help
	  Say Y to enable support for LEDs connected to LED1202
	  LED driver chips accessed via the I2C bus.
@@ -1022,7 +1024,7 @@ source "drivers/leds/rgb/Kconfig"
comment "LED Triggers"
source "drivers/leds/trigger/Kconfig"

comment "Simple LED drivers"
source "drivers/leds/simple/Kconfig"
comment "Simatic LED drivers"
source "drivers/leds/simatic/Kconfig"

endif # NEW_LEDS
+2 −2
Original line number Diff line number Diff line
@@ -122,5 +122,5 @@ obj-$(CONFIG_LEDS_TRIGGERS) += trigger/
# LED Blink
obj-y					+= blink/

# Simple LED drivers
obj-y					+= simple/
# Simatic LED drivers
obj-y					+= simatic/
Loading