Commit fea17683 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Lee Jones:
 "Core Frameworks:
   - New trigger for Input Events
   - New led_mc_set_brightness() call to adapt colour/brightness for
     mutli-colour LEDs
   - New lled_mc_trigger_event() call to call the above based on given
     trigger conditions
   - New led_get_color_name() call, a wrapper around the existing
     led_colors[] array
   - A new flag to avoid automatic renaming of LED devices

  New Drivers:
   - Silergy SY7802 Flash LED Controller
   - Texas Instruments LP5569 LED Controller
   - ChromeOS EC LED Controller

  New Device Support:
   - KTD202{6,7} support for Kinetic KTD2026/7 LEDs

  Fix-ups:
   - Replace ACPI/DT firmware helpers with agnostic variants
   - Make use of resource managed devm_* API calls
   - Device Tree binding adaptions/conversions/creation
   - Constify/staticise applicable data structures
   - Trivial; spelling, whitespace, coding-style adaptions
   - Drop i2c_device_id::driver_data where the value is unused
   - Utilise centrally provided helpers and macros to aid simplicity and
     avoid duplication
   - Use generic platform device properties instead of OF/ACPI specific
     ones
   - Consolidate/de-duplicate various functionality
   - Remove superfluous/duplicated/unused sections
   - Make use of the new *_scoped() guard APIs
   - Improve/simplify error handling

  Bug Fixes:
   - Flush pending brightness changes before activating the trigger
   - Repair incorrect device naming preventing matches
   - Prevent memory leaks by correctly free resources during error
     handling routines
   - Repair locking issue causing circular dependency splats and
     lock-ups
   - Unregister sysfs entries before deactivating triggers to prevent
     use-after issues
   - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings
   - Use correct return codes expected by the callers
   - Omit set_brightness() error message for a LEDs that support only HW
     triggers"

* tag 'leds-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (65 commits)
  leds: leds-lp5569: Enable chip after chip configuration
  leds: leds-lp5569: Better handle enabling clock internal setting
  leds: leds-lp5569: Fix typo in driver name
  leds: flash: leds-qcom-flash: Test the correct variable in init
  leds: leds-lp55xx: Convert mutex lock/unlock to guard API
  leds: leds-lp5523: Convert to sysfs_emit API
  leds: leds-lp5569: Convert to sysfs_emit API
  Revert "leds: led-core: Fix refcount leak in of_led_get()"
  leds: leds-lp5569: Add support for Texas Instruments LP5569
  leds: leds-lp55xx: Drop deprecated defines
  leds: leds-lp55xx: Support ENGINE program up to 128 bytes
  leds: leds-lp55xx: Generalize sysfs master_fader
  leds: leds-lp55xx: Generalize sysfs engine_leds
  leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode
  leds: leds-lp55xx: Generalize stop_engine function
  leds: leds-lp55xx: Generalize turn_off_channels function
  leds: leds-lp55xx: Generalize set_led_current function
  leds: leds-lp55xx: Generalize multicolor_brightness function
  leds: leds-lp55xx: Generalize led_brightness function
  leds: leds-lp55xx: Generalize firmware_loaded function
  ...
parents e0d97b04 b0eed397
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ properties:
      - national,lp5523
      - ti,lp55231
      - ti,lp5562
      - ti,lp5569
      - ti,lp8501

  reg:
@@ -151,6 +152,16 @@ patternProperties:
        $ref: /schemas/types.yaml#/definitions/string
        description: name of channel

if:
  not:
    properties:
      compatible:
        contains:
          const: ti,lp8501
then:
  properties:
    pwr-sel: false

required:
  - compatible
  - reg
+100 −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/silergy,sy7802.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Silergy SY7802 1800mA Boost Charge Pump LED Driver

maintainers:
  - André Apitzsch <git@apitzsch.eu>

description: |
  The SY7802 is a current-regulated charge pump which can regulate two current
  levels for Flash and Torch modes.

  The SY7802 is a high-current synchronous boost converter with 2-channel
  high side current sources. Each channel is able to deliver 900mA current.

properties:
  compatible:
    enum:
      - silergy,sy7802

  reg:
    maxItems: 1

  enable-gpios:
    maxItems: 1
    description: A connection to the 'EN' pin.

  flash-gpios:
    maxItems: 1
    description: A connection to the 'FLEN' pin.

  vin-supply:
    description: Regulator providing power to the 'VIN' pin.

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

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

    properties:
      reg:
        description: Index of the LED.
        minimum: 0
        maximum: 1

      led-sources:
        minItems: 1
        maxItems: 2
        items:
          minimum: 0
          maximum: 1

    required:
      - reg
      - led-sources

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

additionalProperties: false

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

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

        flash-led-controller@53 {
            compatible = "silergy,sy7802";
            reg = <0x53>;
            #address-cells = <1>;
            #size-cells = <0>;

            enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;

            led@0 {
                reg = <0>;
                function = LED_FUNCTION_FLASH;
                color = <LED_COLOR_ID_WHITE>;
                led-sources = <0>, <1>;
            };
        };
    };
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ The leds-blinkm driver supports the devices of the BlinkM family.
They are RGB-LED modules driven by a (AT)tiny microcontroller and
communicate through I2C. The default address of these modules is
0x09 but this can be changed through a command. By this you could
dasy-chain up to 127 BlinkMs on an I2C bus.
daisy-chain up to 127 BlinkMs on an I2C bus.

The device accepts RGB and HSB color values through separate commands.
Also you can store blinking sequences as "scripts" in
+1 −1
Original line number Diff line number Diff line
@@ -12598,7 +12598,7 @@ M: Pavel Machek <pavel@ucw.cz>
M:	Lee Jones <lee@kernel.org>
L:	linux-leds@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git
F:	Documentation/devicetree/bindings/leds/
F:	Documentation/leds/
F:	drivers/leds/
+13 −4
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ config LEDS_LP50XX
	  module will be called leds-lp50xx.

config LEDS_LP55XX_COMMON
	tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
	tristate "Common Driver for TI/National LP5521/5523/55231/5562/5569/8501"
	depends on LEDS_CLASS
	depends on LEDS_CLASS_MULTICOLOR
	depends on OF
@@ -437,8 +437,8 @@ config LEDS_LP55XX_COMMON
	select FW_LOADER
	select FW_LOADER_USER_HELPER
	help
	  This option supports common operations for LP5521/5523/55231/5562/8501
	  devices.
	  This option supports common operations for LP5521/5523/55231/5562/5569/
	  8501 devices.

config LEDS_LP5521
	tristate "LED Support for N.S. LP5521 LED driver chip"
@@ -471,6 +471,16 @@ config LEDS_LP5562
	  Driver provides direct control via LED class and interface for
	  programming the engines.

config LEDS_LP5569
	tristate "LED Support for TI LP5569 LED driver chip"
	depends on LEDS_CLASS && I2C
	depends on LEDS_LP55XX_COMMON
	help
	  If you say yes here you get support for TI LP5569 LED driver.
	  It is 9 channels chip with programmable engines.
	  Driver provides direct control via LED class and interface for
	  programming the engines.

config LEDS_LP8501
	tristate "LED Support for TI LP8501 LED driver chip"
	depends on LEDS_CLASS && I2C
@@ -884,7 +894,6 @@ config LEDS_SPI_BYTE
	tristate "LED support for SPI LED controller with a single byte"
	depends on LEDS_CLASS
	depends on SPI
	depends on OF
	help
	  This option enables support for LED controller which use a single byte
	  for controlling the brightness. Currently the following controller is
Loading