devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lin, Meng-Bo" <linmengbo0689@protonmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stanislav Jakubek <stano.jakubek@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Nikita Travkin <nikita@trvn.ru>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: [PATCH 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED
Date: Sat, 19 Nov 2022 20:28:12 +0000	[thread overview]
Message-ID: <20221119202659.93667-1-linmengbo0689@protonmail.com> (raw)
In-Reply-To: <20221119202316.93142-1-linmengbo0689@protonmail.com>

FL8005A uses SGM3140 Flash LED driver. Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 .../boot/dts/qcom/msm8916-gplus-fl8005a.dts   | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
index cc81880f7c42..131e12ae510e 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
@@ -21,6 +21,21 @@ chosen {
 		stdout-path = "serial0";
 	};
 
+	flash-led-controller {
+		compatible = "sgmicro,sgm3140";
+		enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
+		flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&camera_flash_default>;
+
+		flash_led: led {
+			function = LED_FUNCTION_FLASH;
+			color = <LED_COLOR_ID_WHITE>;
+			flash-max-timeout-us = <250000>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -239,6 +254,14 @@ l18 {
 };
 
 &msmgpio {
+	camera_flash_default: camera-flash-default-state {
+		pins = "gpio31", "gpio32";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	gpio_keys_default: gpio-keys-default-state {
 		pins = "gpio107";
 		function = "gpio";
-- 
2.30.2



  parent reply	other threads:[~2022-11-19 20:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19 20:24 [PATCH 0/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add initial device tree Lin, Meng-Bo
2022-11-19 20:27 ` [PATCH 1/5] dt-bindings: vendor-prefixes: Add GPLUS Lin, Meng-Bo
2022-11-21  9:15   ` Krzysztof Kozlowski
2022-11-19 20:27 ` [PATCH 2/5] dt-bindings: qcom: Document bindings for new msm8916-gplus-fl8005a device Lin, Meng-Bo
2022-11-21  9:16   ` Krzysztof Kozlowski
2022-11-19 20:27 ` [PATCH 3/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add initial device tree Lin, Meng-Bo
2022-11-21 11:22   ` Konrad Dybcio
2022-11-19 20:27 ` [PATCH 4/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add touchscreen Lin, Meng-Bo
2022-11-21 11:23   ` Konrad Dybcio
2022-11-19 20:28 ` Lin, Meng-Bo [this message]
2022-11-21 11:24   ` [PATCH 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED Konrad Dybcio

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=20221119202659.93667-1-linmengbo0689@protonmail.com \
    --to=linmengbo0689@protonmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@trvn.ru \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=stano.jakubek@gmail.com \
    --cc=stephan@gerhold.net \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).