From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: devicetree@vger.kernel.org, Lee Jones <lee@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-arm-msm@vger.kernel.org,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org
Subject: [PATCH 2/5] dt-bindings: leds: pm8058: convert from txt to YAML format
Date: Thu, 1 Dec 2022 22:21:41 +0200 [thread overview]
Message-ID: <20221201202144.448694-3-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20221201202144.448694-1-dmitry.baryshkov@linaro.org>
Convert the bindings for the leds subdevice of Qualcomm PM8058 PMIC
from text to YAML format.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
.../devicetree/bindings/leds/leds-pm8058.txt | 67 ---------------
.../devicetree/bindings/leds/leds-pm8058.yaml | 81 +++++++++++++++++++
2 files changed, 81 insertions(+), 67 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt
create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.yaml
diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt
deleted file mode 100644
index 89584c49aab2..000000000000
--- a/Documentation/devicetree/bindings/leds/leds-pm8058.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-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";
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.yaml b/Documentation/devicetree/bindings/leds/leds-pm8058.yaml
new file mode 100644
index 000000000000..a73bffb36808
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-pm8058.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-pm8058.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PM8058 LED driver
+
+maintainers:
+ - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+description: |
+ 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.
+
+$ref: common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - qcom,pm8058-led
+ - qcom,pm8058-keypad-led
+ - qcom,pm8058-flash-led
+
+ reg:
+ description: resource address
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ 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";
+ };
+ };
+...
--
2.35.1
next prev parent reply other threads:[~2022-12-01 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 20:21 [PATCH 0/5] dt-bindings: add missing subdevices to qcom-pm8xxx schema Dmitry Baryshkov
2022-12-01 20:21 ` [PATCH 1/5] dt-bindings: input: qcom,pm8921-keypad: convert to YAML format Dmitry Baryshkov
2022-12-01 20:21 ` Dmitry Baryshkov [this message]
2022-12-02 8:30 ` [PATCH 2/5] dt-bindings: leds: pm8058: convert from txt " Krzysztof Kozlowski
2022-12-04 6:12 ` Dmitry Baryshkov
2022-12-01 20:21 ` [PATCH 3/5] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
2022-12-01 20:21 ` [PATCH 4/5] dt-bindings: iio: adc: qcom,pm8018-adc: allow specifying MPP channels Dmitry Baryshkov
2022-12-01 20:21 ` [PATCH 5/5] dt-bindings: leds: Add 'cm3605' to 'linux,default-trigger' Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221201202144.448694-3-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).