Commit 7b8653a5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Lee Jones:
 "Updates:
   - Add optional GPIO enable pin support to PWM LED driver

  Fixes:
   - Allow LED module 0 to be added to module bank in lp50xx driver
   - Fix upboard LED driver module alias to ensure proper auto-loading
   - Update LP5009 to support 3 modules for a total of 9 LEDs
   - Skip LEDs without color components in cros_ec driver instead of
     failing probe
   - Fix GPIO descriptor leaks in netxbig error paths by releasing
     acquired GPIOs
   - Allow LED_COLOR_ID_MULTI in qcom-lpg driver for greater flexibility
   - Enable LP55XX common LED use without FW_LOADER_USER_HELPER
   - Ensure lp50xx chip is enabled before any I2C communication

  Cleanups:
   - Use fwnode_for_each_child_node() instead of
     fwnode_for_each_available_child_node() in LED drivers
   - Use device_get_next_child_node() instead of
     fwnode_get_next_available_child_node() in LED flash drivers
   - Replace sprintf() with sysfs_emit() in sysfs show functions for
     improved bounds checking
   - Replace system_wq() with system_percpu_wq() in the input event
     trigger
   - Reorder include files to alphabetic order in the PWM LED driver
   - Do not enable TRILED in qcom-lpg when configuring PWM
   - Drop duplicate LEDS_EXPRESSWIRE config from Kconfig

  Removals:
   - Remove arcxcnn_bl.txt Device Tree binding documentation

  Devicetree bindings:
   - Convert ArcticSand arc2c0608 LED driver binding to DT Schema
   - Add default-brightness property to common LED binding
   - Add enable-gpios property to PWM LED binding
   - Add PM7550 to qcom,spmi-flash-led compatible
   - Explain standalone PWM usage in qcom-lpg binding"

* tag 'leds-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (21 commits)
  leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM
  dt-bindings: leds: qcom-lpg: Explain standalone PWM usage
  leds: rgb: leds-qcom-lpg: Allow LED_COLOR_ID_MULTI
  leds: pwm: Reorder include files to alphabetic order
  leds: pwm: Add optional GPIO enable pin support
  dt-bindings: leds: pwm: Add enable-gpios property
  leds: trigger: Replace use of system_wq() with system_percpu_wq()
  leds: led-class: Replace sprintf() with sysfs_emit() in sysfs show functions
  dt-bindings: leds: qcom,spmi-flash-led: Add PM7550
  leds: netxbig: Fix GPIO descriptor leak in error paths
  leds: leds-lp50xx: Enable chip before any communication
  leds: Drop duplicate LEDS_EXPRESSWIRE config
  leds: leds-cros_ec: Skip LEDs without color components
  leds: leds-lp50xx: LP5009 supports 3 modules for a total of 9 LEDs
  leds: upboard: Fix module alias
  leds: leds-lp50xx: Allow LED 0 to be added to module bank
  leds: lp55xx_common: Enable use without FW_LOADER_USER_HELPER
  dt-bindings: leds: Add default-brightness property to common.yaml
  leds: flash: Use fwnode_get_next_child_node() instead
  leds: Use fwnode_for_each_child_node() instead
  ...
parents 980190a9 072cd5f4
Loading
Loading
Loading
Loading
+108 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/arc,arc2c0608.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ArcticSand arc2c0608 LED driver

description: |
  The ArcticSand arc2c0608 LED driver provides ultra
  efficient notebook backlighting. Optional properties not
  specified will default to values in IC EPROM.

  Datasheet:
  https://www.murata.com/-/media/webrenewal/products/power/power-semiconductor/overview/lineup/led-boost/arc2/arc2c0608.ashx.

maintainers:
  - Brian Dodge <bdodge@arcticsand.com>

allOf:
  - $ref: /schemas/leds/common.yaml

properties:
  compatible:
    const: arc,arc2c0608

  reg:
    maxItems: 1

  default-brightness:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 4095

  led-sources:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: List of enabled channels
    items:
      enum: [0, 1, 2, 3, 4, 5]
    minItems: 1
    uniqueItems: true

  arc,led-config-0:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Fading speed (period between intensity
      steps)

  arc,led-config-1:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: If set, sets ILED_CONFIG register. Used for
      fine tuning the maximum LED current.

  arc,dim-freq:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: PWM mode frequency setting (bits [3:0] used)

  arc,comp-config:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Setting for register CONFIG_COMP which
      controls internal resitances, feed forward freqs,
      and initial VOUT at startup. Consult the datasheet.

  arc,filter-config:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: RC and PWM Filter settings.
      Bit Assignment
      7654 3    2    1    0
      xxxx RCF1 RCF0 PWM1 PWM0
      RCF statuses        PWM Filter Statues
      00 = OFF (default)  00 = OFF (default)
      01 = LOW            01 = 2 STEPS
      10 - MEDIUM         10 = 4 STEPS
      11 = HIGH           11 = 8 STEPS

  arc,trim-config:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Sets percentage increase of Maximum LED
      Current.
      0x00 = 0% increase.
      0x20 = 20.2%.
      0x3F = 41.5%

  label: true

  linux,default-trigger: true

additionalProperties: false

required:
  - compatible
  - reg

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

        led-controller@30 {
            compatible = "arc,arc2c0608";
            reg = <0x30>;
            default-brightness = <500>;
            label = "lcd-backlight";
            linux,default-trigger = "backlight";
            led-sources = <0 1 2 5>;
        };
    };
...
+0 −33
Original line number Diff line number Diff line
Binding for ArcticSand arc2c0608 LED driver

Required properties:
- compatible:		should be "arc,arc2c0608"
- reg:			slave address

Optional properties:
- default-brightness:	brightness value on boot, value from: 0-4095
- label:		The name of the backlight device
			See Documentation/devicetree/bindings/leds/common.txt
- led-sources:		List of enabled channels from 0 to 5.
			See Documentation/devicetree/bindings/leds/common.txt

- arc,led-config-0:	setting for register ILED_CONFIG_0
- arc,led-config-1:	setting for register ILED_CONFIG_1
- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
- arc,comp-config:	setting for register CONFIG_COMP
- arc,filter-config:	setting for register FILTER_CONFIG
- arc,trim-config:	setting for register IMAXTUNE

Note: Optional properties not specified will default to values in IC EPROM

Example:

arc2c0608@30 {
	compatible = "arc,arc2c0608";
	reg = <0x30>;
	default-brightness = <500>;
	label = "lcd-backlight";
	linux,default-trigger = "backlight";
	led-sources = <0 1 2 5>;
};
+6 −0
Original line number Diff line number Diff line
@@ -173,6 +173,12 @@ properties:
      led-max-microamp.
    $ref: /schemas/types.yaml#/definitions/uint32

  default-brightness:
    description:
      Brightness to be set if LED's default state is on. Used only during
      initialization. If the option is not set then max brightness is used.
    $ref: /schemas/types.yaml#/definitions/uint32

  panic-indicator:
    description:
      This property specifies that the LED should be used, if at all possible,
+7 −0
Original line number Diff line number Diff line
@@ -40,6 +40,13 @@ patternProperties:
          initialization. If the option is not set then max brightness is used.
        $ref: /schemas/types.yaml#/definitions/uint32

      enable-gpios:
        description:
          GPIO for LED hardware enable control. Set active when brightness is
          non-zero and inactive when brightness is zero.
          The GPIO default state follows the "default-state" property.
        maxItems: 1

    required:
      - pwms
      - max-brightness
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,11 @@ description: >
  The Qualcomm Light Pulse Generator consists of three different hardware blocks;
  a ramp generator with lookup table (LUT), the light pulse generator and a three
  channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
  The light pulse generator (LPG) can also be used independently to output PWM
  signal for standard PWM applications. In this scenario, the LPG output should
  be routed to a specific PMIC GPIO by setting the GPIO pin mux to the special
  functions indicated in the datasheet, the TRILED driver for the channel will
  not be enabled in this configuration.

properties:
  compatible:
Loading