Commit b29e6ece authored by Andrew Morton's avatar Andrew Morton
Browse files

Resync master with latest Linus upstream

parents 77856d91 f9ff5644
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ properties:
          - pattern
        # LED is triggered by SD/MMC activity
      - pattern: "^mmc[0-9]+$"
      - pattern: "^cpu[0-9]*$"

  led-pattern:
    description: |
+0 −67
Original line number Diff line number Diff line
Qualcomm PM8058 LED driver

The Qualcomm PM8058 is a multi-functional device which contains
an LED driver block for up to six LEDs: three normal LEDs, two
"flash" LEDs and one "keypad backlight" LED. The names are
quoted because sometimes these LED drivers are used for wildly
different things than flash or keypad backlight: their names
are more of a suggestion than a hard-wired usecase.

Hardware-wise the different LEDs support slightly different
output currents. The "flash" LEDs do not need to charge nor
do they support external triggers. They are just powerful LED
drivers.

The LEDs appear as children to the PM8058 device, with the
proper compatible string. For the PM8058 bindings see:
mfd/qcom-pm8xxx.txt.

Each LED is represented as a sub-node of the syscon device. Each
node's name represents the name of the corresponding LED.

LED sub-node properties:

Required properties:
- compatible: one of
  "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
  "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
  "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)

Optional properties:
- label: see Documentation/devicetree/bindings/leds/common.txt
- default-state: see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt

Example:

qcom,ssbi@500000 {
	pmicintc: pmic@0 {
		compatible = "qcom,pm8058";
		led@48 {
			compatible = "qcom,pm8058-keypad-led";
			reg = <0x48>;
			label = "pm8050:white:keypad";
			default-state = "off";
		};
		led@131 {
			compatible = "qcom,pm8058-led";
			reg = <0x131>;
			label = "pm8058:red";
			default-state = "off";
		};
		led@132 {
			compatible = "qcom,pm8058-led";
			reg = <0x132>;
			label = "pm8058:yellow";
			default-state = "off";
			linux,default-trigger = "mmc0";
		};
		led@133 {
			compatible = "qcom,pm8058-led";
			reg = <0x133>;
			label = "pm8058:green";
			default-state = "on";
			linux,default-trigger = "heartbeat";
		};
	};
};
+57 −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,pm8058-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm PM8058 PMIC LED

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

description: |
  The Qualcomm PM8058 contains an LED block for up to six LEDs:: three normal
  LEDs, two "flash" LEDs and one "keypad backlight" LED. The names are quoted
  because sometimes these LED drivers are used for wildly different things than
  flash or keypad backlight:: their names are more of a suggestion than a
  hard-wired usecase.

  Hardware-wise the different LEDs support slightly different output currents.
  The "flash" LEDs do not need to charge nor do they support external triggers.
  They are just powerful LED drivers.

allOf:
  - $ref: common.yaml#

properties:
  compatible:
    enum:
      - qcom,pm8058-led
      - qcom,pm8058-keypad-led
      - qcom,pm8058-flash-led

  reg:
    maxItems: 1

required:
  - compatible
  - reg

unevaluatedProperties: false

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

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

        led@131 {
            compatible = "qcom,pm8058-led";
            reg = <0x131>;
            label = "pm8058:red";
            color = <LED_COLOR_ID_RED>;
            default-state = "off";
        };
    };
+3 −3
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ description: |
maintainers:
  - Dmitry Osipenko <digetx@gmail.com>

$ref: /schemas/power/supply/power-supply.yaml

properties:
  compatible:
    items:
@@ -22,15 +24,13 @@ properties:
  reg:
    maxItems: 1

  monitored-battery: true
  power-supplies: true
  system-power-controller: true

required:
  - compatible
  - reg

additionalProperties: false
unevaluatedProperties: false

examples:
  - |
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ properties:
  interrupt-controller: true

patternProperties:
  "led@[0-9a-f]+$":
    type: object
    $ref: /schemas/leds/qcom,pm8058-led.yaml#

  "rtc@[0-9a-f]+$":
    type: object
    $ref: "../rtc/qcom-pm8xxx-rtc.yaml"
Loading