devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>
To: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>, Rob Herring <robh+dt@kernel.org>
Cc: linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	Brian Masney <masneyb@onstation.org>, Luca Weiss <luca@z3ntu.xyz>,
	Russell King <linux@armlinux.org.uk>,
	Georgi Djakov <georgi.djakov@linaro.org>,
	linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org,
	andrealmeid@collabora.com
Subject: [RFC PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: Add support for the flash LED
Date: Fri, 06 Nov 2020 16:59:25 +0000	[thread overview]
Message-ID: <20201106165737.1029106-4-nfraprado@protonmail.com> (raw)
In-Reply-To: <20201106165737.1029106-1-nfraprado@protonmail.com>

Add the necessary device tree nodes for the flash LED.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
---
 .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index 32b474bfeec3..6aa93c236178 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -730,4 +730,60 @@ otg {
 			};
 		};
 	};
+	pm8941@1 {
+		qcom,leds@d300 {
+			status = "ok";
+
+			compatible = "qcom,leds-qpnp";
+			reg = <0xd300 0x100>;
+			label = "flash";
+			flash-boost-supply = <&pm8941_5vs1>;
+			torch-boost-supply = <&pm8941_5v>;
+			pm8941_flash0: qcom,flash_0 {
+				qcom,max-current = <1000>;
+				qcom,default-state = "off";
+				qcom,headroom = <3>;
+				qcom,duration = <1280>;
+				qcom,clamp-curr = <200>;
+				qcom,startup-dly = <3>;
+				qcom,safety-timer;
+				label = "flash";
+				linux,default-trigger =
+					"flash0_trigger";
+				qcom,id = <1>;
+				linux,name = "led:flash_0";
+				qcom,current = <620>;
+			};
+
+			pm8941_flash1: qcom,flash_1 {
+				qcom,max-current = <1000>;
+				qcom,default-state = "off";
+				qcom,headroom = <3>;
+				qcom,duration = <1280>;
+				qcom,clamp-curr = <200>;
+				qcom,startup-dly = <3>;
+				qcom,safety-timer;
+				linux,default-trigger =
+					"flash1_trigger";
+				label = "flash";
+				qcom,id = <2>;
+				linux,name = "led:flash_1";
+				qcom,current = <620>;
+			};
+
+			pm8941_torch: qcom,flash_torch {
+				qcom,max-current = <200>;
+				qcom,default-state = "off";
+				qcom,headroom = <0>;
+				qcom,startup-dly = <1>;
+				linux,default-trigger =
+					"torch_trigger";
+				label = "flash";
+				qcom,id = <2>;
+				linux,name = "led:flash_torch";
+				qcom,current = <90>;
+				qcom,torch-enable;
+			};
+		};
+	};
 };
-- 
2.29.2



      parent reply	other threads:[~2020-11-06 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 16:58 [RFC PATCH 0/3] Add support for the flash LED on Nexus 5 Nícolas F. R. A. Prado
2020-11-06 16:58 ` [RFC PATCH 1/3] leds: Add driver for QPNP flash led Nícolas F. R. A. Prado
2020-11-08 16:52   ` Jacek Anaszewski
2020-11-22  4:44   ` Bjorn Andersson
2020-11-06 16:59 ` [RFC PATCH 2/3] ARM: qcom_defconfig: Add QPNP flash LED support Nícolas F. R. A. Prado
2020-11-06 16:59 ` Nícolas F. R. A. Prado [this message]

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=20201106165737.1029106-4-nfraprado@protonmail.com \
    --to=nfraprado@protonmail.com \
    --cc=agross@kernel.org \
    --cc=andrealmeid@collabora.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkcamp@lists.libreplanetbr.org \
    --cc=luca@z3ntu.xyz \
    --cc=masneyb@onstation.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).