Commit c5eb8bf7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Lee Jones:
 "New Drivers:
   - Add support for MediaTek MT6370 LED Indicator
   - Add support for MediaTek MT6370 Flashlight
   - Add support for QCOM PMIC Flash
   - Add support for Rohm BD2606MVV Charge Pump LED

  New Device Support:
   - Add support for PMK8550 PWM to QCOM LPG

  New Functionality:
   - Add support for high resolution PWM to QCOM LPG

  Fix-ups:
   - Kconfig 'depends' and 'select' dependency changes
   - Remove unused / irrelevant includes
   - Remove unnecessary checks (already performed further into the call stack)
   - Trivial: Fix commentary, simplify error messages
   - Rid 'defined but not used' warnings
   - Provide documentation
   - Explicitly provide include files

  Bug Fixes:
   - Mark GPIO LED as BROKEN
   - Fix Kconfig entries
   - Fix various Smatch staticify reports
   - Fix error handling (or a lack there of)"

* tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits)
  leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
  dt-bindings: leds: Add ROHM BD2606MVV LED
  docs: leds: ledtrig-oneshot: Fix spelling mistake
  leds: pwm-multicolor: Simplify an error message
  dt-bindings: leds: Convert PCA9532 to dtschema
  leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM
  leds: rgb: leds-qcom-lpg: Add support for high resolution PWM
  dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string
  leds: tca6507: Fix error handling of using fwnode_property_read_string
  leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
  leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB
  MAINTAINERS: Add entry for LED devices documentation
  Documentation: leds: MT6370: Use bullet lists for timing variables
  Documentation: leds: mt6370: Properly wrap hw_pattern chart
  Documentation: leds: Add MT6370 doc to the toctree
  leds: rgb: mt6370: Fix implicit declaration for FIELD_GET
  docs: leds: Add MT6370 RGB LED pattern document
  leds: flash: mt6370: Add MediaTek MT6370 flashlight support
  leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support
  dt-bindings: leds: spmi-flash-led: Add pm6150l compatible
  ...
parents 865fdb08 8325642d
Loading
Loading
Loading
Loading
+32 −3
Original line number Diff line number Diff line
@@ -90,22 +90,51 @@ properties:
          - heartbeat
            # LED indicates disk activity
          - disk-activity
            # LED indicates disk read activity
          - disk-read
            # LED indicates disk write activity
          - disk-write
            # LED flashes at a fixed, configurable rate
          - timer
            # LED alters the brightness for the specified duration with one software
            # timer (requires "led-pattern" property)
          - pattern
            # LED indicates mic mute state
          - audio-micmute
            # LED indicates audio mute state
          - audio-mute
            # LED indicates bluetooth power state
          - bluetooth-power
            # LED indicates activity of all CPUs
          - cpu
            # LED indicates camera flash state
          - flash
            # LED indicated keyboard capslock
          - kbd-capslock
            # LED indicates MTD memory activity
          - mtd
            # LED indicates NAND memory activity (deprecated),
            # in new implementations use "mtd"
          - nand-disk
            # No trigger assigned to the LED. This is the default mode
            # if trigger is absent
          - none
            # LED indicates camera torch state
          - torch
            # LED indicates USB gadget activity
          - usb-gadget
            # LED indicates USB host activity
          - usb-host
            # LED indicates USB port state
          - usbport
        # LED is triggered by CPU activity
      - pattern: "^cpu[0-9]*$"
      - pattern: "^hci[0-9]+-power$"
        # LED is triggered by Bluetooth activity
      - pattern: "^mmc[0-9]+$"
      - pattern: "^hci[0-9]+-power$"
        # LED is triggered by SD/MMC activity
      - pattern: "^phy[0-9]+tx$"
      - pattern: "^mmc[0-9]+$"
        # LED is triggered by WLAN activity
      - pattern: "^phy[0-9]+tx$"

  led-pattern:
    description: |
+0 −49
Original line number Diff line number Diff line
*NXP - pca9532 PWM LED Driver

The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
The PWM support 256 steps.

Required properties:
	- compatible:
		"nxp,pca9530"
		"nxp,pca9531"
		"nxp,pca9532"
		"nxp,pca9533"
	- reg -  I2C slave address

Each led is represented as a sub-node of the nxp,pca9530.

Optional sub-node properties:
	- label: see Documentation/devicetree/bindings/leds/common.txt
	- type: Output configuration, see dt-bindings/leds/leds-pca9532.h (default NONE)
	- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
	- default-state: see Documentation/devicetree/bindings/leds/common.txt
	  This property is only valid for sub-nodes of type <PCA9532_TYPE_LED>.

Example:
  #include <dt-bindings/leds/leds-pca9532.h>

  leds: pca9530@60 {
    compatible = "nxp,pca9530";
    reg = <0x60>;

    red-power {
      label = "pca:red:power";
      type = <PCA9532_TYPE_LED>;
    };
    green-power {
      label = "pca:green:power";
      type = <PCA9532_TYPE_LED>;
    };
    kernel-booting {
      type = <PCA9532_TYPE_LED>;
      default-state = "on";
    };
    sys-stat {
      type = <PCA9532_TYPE_LED>;
      default-state = "keep"; // don't touch, was set by U-Boot
    };
  };

For more product information please see the link below:
http://nxp.com/documents/data_sheet/PCA9532.pdf
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ properties:
      - qcom,pmc8180c-lpg
      - qcom,pmi8994-lpg
      - qcom,pmi8998-lpg
      - qcom,pmk8550-pwm

  "#pwm-cells":
    const: 2
+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/nxp,pca953x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP PCA9532 LED Dimmer

maintainers:
  - Riku Voipio <riku.voipio@iki.fi>

description: |
  The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
  The PWM support 256 steps.

  For more product information please see the link below:
    https://www.nxp.com/docs/en/data-sheet/PCA9532.pdf

properties:
  compatible:
    enum:
      - nxp,pca9530
      - nxp,pca9531
      - nxp,pca9532
      - nxp,pca9533

  reg:
    maxItems: 1

  gpio-controller: true

  '#gpio-cells':
    const: 2

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

    properties:
      type:
        description: |
          Output configuration, see include/dt-bindings/leds/leds-pca9532.h
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 0
        minimum: 0
        maximum: 4

required:
  - compatible
  - reg

additionalProperties: false

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

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

        led-controller@62 {
            compatible = "nxp,pca9533";
            reg = <0x62>;

            led-1 {
                label = "pca:red:power";
                type = <PCA9532_TYPE_LED>;
            };

            led-2 {
                label = "pca:green:power";
                type = <PCA9532_TYPE_LED>;
            };

            led-3 {
                type = <PCA9532_TYPE_LED>;
                default-state = "on";
            };

            led-4 {
                type = <PCA9532_TYPE_LED>;
                default-state = "keep";
            };
        };
    };

...
+117 −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/qcom,spmi-flash-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Flash LED device inside Qualcomm Technologies, Inc. PMICs

maintainers:
  - Fenglin Wu <quic_fenglinw@quicinc.com>

description: |
  Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs.
  The flash LED module can have different number of LED channels supported
  e.g. 3 or 4. There are some different registers between them but they can
  both support maximum current up to 1.5 A per channel and they can also support
  ganging 2 channels together to supply maximum current up to 2 A. The current
  will be split symmetrically on each channel and they will be enabled and
  disabled at the same time.

properties:
  compatible:
    items:
      - enum:
          - qcom,pm6150l-flash-led
          - qcom,pm8150c-flash-led
          - qcom,pm8150l-flash-led
          - qcom,pm8350c-flash-led
      - const: qcom,spmi-flash-led

  reg:
    maxItems: 1

patternProperties:
  "^led-[0-3]$":
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false
    description:
      Represents the physical LED components which are connected to the
      flash LED channels' output.

    properties:
      led-sources:
        description:
          The HW indices of the flash LED channels that connect to the
          physical LED
        allOf:
          - minItems: 1
            maxItems: 2
            items:
              enum: [1, 2, 3, 4]

      led-max-microamp:
        anyOf:
          - minimum: 5000
            maximum: 500000
            multipleOf: 5000
          - minimum: 10000
            maximum: 1000000
            multipleOf: 10000

      flash-max-microamp:
        anyOf:
          - minimum: 12500
            maximum: 1500000
            multipleOf: 12500
          - minimum: 25000
            maximum: 2000000
            multipleOf: 25000

      flash-max-timeout-us:
        minimum: 10000
        maximum: 1280000
        multipleOf: 10000

    required:
      - led-sources
      - led-max-microamp

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/leds/common.h>
    spmi {
        #address-cells = <1>;
        #size-cells = <0>;
        led-controller@ee00 {
            compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
            reg = <0xee00>;

            led-0 {
                function = LED_FUNCTION_FLASH;
                color = <LED_COLOR_ID_WHITE>;
                led-sources = <1>, <4>;
                led-max-microamp = <300000>;
                flash-max-microamp = <2000000>;
                flash-max-timeout-us = <1280000>;
                function-enumerator = <0>;
            };

            led-1 {
                function = LED_FUNCTION_FLASH;
                color = <LED_COLOR_ID_YELLOW>;
                led-sources = <2>, <3>;
                led-max-microamp = <300000>;
                flash-max-microamp = <2000000>;
                flash-max-timeout-us = <1280000>;
                function-enumerator = <1>;
            };
        };
    };
Loading