All of lore.kernel.org
 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 v3 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED
Date: Mon, 21 Nov 2022 13:30:08 +0000	[thread overview]
Message-ID: <20221121132838.207107-1-linmengbo0689@protonmail.com> (raw)
In-Reply-To: <20221121132139.206581-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>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../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 2cac99e3e52c..b28d7d0f1ed5 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-21 13:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 13:27 [PATCH v3 0/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add initial device tree Lin, Meng-Bo
2022-11-21 13:29 ` [PATCH v3 1/5] dt-bindings: vendor-prefixes: Add GPLUS Lin, Meng-Bo
2022-11-21 13:29 ` [PATCH v3 2/5] dt-bindings: qcom: Document msm8916-gplus-fl8005a Lin, Meng-Bo
2022-11-21 13:29 ` [PATCH v3 3/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add initial device tree Lin, Meng-Bo
2022-11-21 13:30 ` [PATCH v3 4/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add touchscreen Lin, Meng-Bo
2022-11-21 13:30 ` Lin, Meng-Bo [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=20221121132838.207107-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.