From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Richard Purdie <rpurdie@rpsys.net>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
Fenglin Wu <fenglinw@codeaurora.org>
Subject: [PATCH v3 3/3] DT: leds: Add Qualcomm Light Pulse Generator binding
Date: Tue, 14 Nov 2017 23:13:45 -0800 [thread overview]
Message-ID: <20171115071345.24331-4-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20171115071345.24331-1-bjorn.andersson@linaro.org>
This adds the binding document describing the three hardware blocks
related to the Light Pulse Generator found in a wide range of Qualcomm
PMICs.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Changes since v2:
- Squashed all things into one node
- Removed quirks from the binding, compatible implies number of channels, their
configuration etc.
- Binding describes LEDs connected as child nodes
- Support describing multi-channel LEDs
- Change style of the binding document, to match other LED bindings
Changes since v1:
- Dropped custom pattern properties
- Renamed cell-index to qcom,lpg-channel to clarify its purpose
.../devicetree/bindings/leds/leds-qcom-lpg.txt | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt
diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt
new file mode 100644
index 000000000000..9cee6f9f543c
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt
@@ -0,0 +1,66 @@
+Binding for Qualcomm Light Pulse Generator
+
+The Qualcomm Light Pulse Generator consists of three different hardware blocks;
+a ramp generator with lookup table, the light pulse generator and a three
+channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
+
+Required properties:
+- compatible: one of:
+ "qcom,pm8916-pwm",
+ "qcom,pm8941-lpg",
+ "qcom,pm8994-lpg",
+ "qcom,pmi8994-lpg",
+ "qcom,pmi8998-lpg",
+
+Optional properties:
+- qcom,power-source: power-source used to drive the output, as defined in the
+ datasheet. Should be specified if the TRILED block is
+ present
+- qcom,dtest: configures the output into an internal test line of the
+ pmic. Specified by a list of u32 pairs, one pair per channel,
+ where each pair denotes the test line to drive and the second
+ configures how the value should be outputed, as defined in the
+ datasheet
+- #pwm-cells: should be 2, see ../pwm/pwm.txt
+
+LED subnodes:
+A set of subnodes can be used to specify LEDs connected to the LPG. Channels
+not associated with a LED are available as pwm channels, see ../pwm/pwm.txt.
+
+Required properties:
+- led-sources: list of channels associated with this LED, starting at 1 for the
+ first LPG channel
+
+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:
+The following example defines a RGB LED attached to the PM8941.
+
+&spmi_bus {
+ pm8941@1 {
+ lpg {
+ compatible = "qcom,pm8941-lpg";
+ qcom,power-source = <1>;
+
+ rgb {
+ led-sources = <7 6 5>;
+ };
+ };
+ };
+};
+
+The following example defines the single PWM channel of the PM8916, which can
+be muxed by the MPP4 as a current sink.
+
+&spmi_bus {
+ pm8916@1 {
+ pm8916_pwm: pwm {
+ compatible = "qcom,pm8916-pwm";
+
+ #pwm-cells = <2>;
+ };
+ };
+};
--
2.15.0
next prev parent reply other threads:[~2017-11-15 7:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 7:13 [PATCH v3 0/3] Qualcomm Light Pulse Generator Bjorn Andersson
[not found] ` <20171115071345.24331-1-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-11-15 7:13 ` [PATCH v3 1/3] leds: core: Introduce generic pattern interface Bjorn Andersson
2017-11-15 7:36 ` Greg KH
2017-11-20 23:20 ` Pavel Machek
2017-11-21 0:21 ` Bjorn Andersson
2017-12-08 14:27 ` Pavel Machek
2017-11-21 20:33 ` Jacek Anaszewski
2017-11-15 7:13 ` [PATCH v3 2/3] leds: Add driver for Qualcomm LPG Bjorn Andersson
2017-11-19 21:36 ` Jacek Anaszewski
2017-11-20 21:10 ` Bjorn Andersson
2017-11-20 23:22 ` Pavel Machek
2017-11-21 22:01 ` Jacek Anaszewski
2017-11-21 22:00 ` Jacek Anaszewski
2017-11-15 7:13 ` Bjorn Andersson [this message]
[not found] ` <20171115071345.24331-4-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-11-16 5:09 ` [PATCH v3 3/3] DT: leds: Add Qualcomm Light Pulse Generator binding Rob Herring
2017-11-19 21:35 ` Jacek Anaszewski
2017-11-20 19:58 ` Bjorn Andersson
2017-11-20 20:35 ` Jacek Anaszewski
2017-11-20 21:45 ` Bjorn Andersson
2017-11-22 20:42 ` Jacek Anaszewski
2017-12-18 20:49 ` Bjorn Andersson
2017-12-19 21:30 ` Jacek Anaszewski
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=20171115071345.24331-4-bjorn.andersson@linaro.org \
--to=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=fenglinw@codeaurora.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.net \
/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).