Skip to content

Commit 6afd8bd

Browse files
krzkpavelmachek
authored andcommitted
leds: qcom,pm8058-led: Convert to DT schema
Convert the Qualcomm PM8058 PMIC LED bindings to DT schema. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 3f6fb1c commit 6afd8bd

File tree

3 files changed

+61
-67
lines changed

3 files changed

+61
-67
lines changed

Documentation/devicetree/bindings/leds/leds-pm8058.txt

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/qcom,pm8058-led.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm PM8058 PMIC LED
8+
9+
maintainers:
10+
- Krzysztof Kozlowski <[email protected]>
11+
12+
description: |
13+
The Qualcomm PM8058 contains an LED block for up to six LEDs:: three normal
14+
LEDs, two "flash" LEDs and one "keypad backlight" LED. The names are quoted
15+
because sometimes these LED drivers are used for wildly different things than
16+
flash or keypad backlight:: their names are more of a suggestion than a
17+
hard-wired usecase.
18+
19+
Hardware-wise the different LEDs support slightly different output currents.
20+
The "flash" LEDs do not need to charge nor do they support external triggers.
21+
They are just powerful LED drivers.
22+
23+
allOf:
24+
- $ref: common.yaml#
25+
26+
properties:
27+
compatible:
28+
enum:
29+
- qcom,pm8058-led
30+
- qcom,pm8058-keypad-led
31+
- qcom,pm8058-flash-led
32+
33+
reg:
34+
maxItems: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
40+
unevaluatedProperties: false
41+
42+
examples:
43+
- |
44+
#include <dt-bindings/leds/common.h>
45+
46+
pmic {
47+
#address-cells = <1>;
48+
#size-cells = <0>;
49+
50+
led@131 {
51+
compatible = "qcom,pm8058-led";
52+
reg = <0x131>;
53+
label = "pm8058:red";
54+
color = <LED_COLOR_ID_RED>;
55+
default-state = "off";
56+
};
57+
};

Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ properties:
3939
interrupt-controller: true
4040

4141
patternProperties:
42+
"led@[0-9a-f]+$":
43+
type: object
44+
$ref: /schemas/leds/qcom,pm8058-led.yaml#
45+
4246
"rtc@[0-9a-f]+$":
4347
type: object
4448
$ref: "../rtc/qcom-pm8xxx-rtc.yaml"

0 commit comments

Comments
 (0)