lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230822140407.3316-1-raymondhackley@protonmail.com>
Date:   Tue, 22 Aug 2023 14:07:12 +0000
From:   Raymond Hackley <raymondhackley@...tonmail.com>
To:     linux-kernel@...r.kernel.org
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Stephan Gerhold <stephan@...hold.net>,
        Nikita Travkin <nikita@...n.ru>, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht
Subject: [PATCH] arm64: dts: qcom: msm8916/39-samsung-a2015: Add flash LED

The phones listed below have Richteck RT5033 LED, which has GPIO pin
configurations similar to SGM3140 Flash LED driver.
Add it to the device trees.

- Samsung Galaxy A3/A5/A7 2015
- Samsung Galaxy E5/E7
- Samsung Galaxy Grand Max

Signed-off-by: Raymond Hackley <raymondhackley@...tonmail.com>
---
 .../qcom/msm8916-samsung-a2015-common.dtsi    | 23 +++++++++++++++++++
 .../boot/dts/qcom/msm8939-samsung-a7.dts      | 23 +++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 019bf73178fa..48990716cafd 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
@@ -36,6 +37,21 @@ clk_pwm: pwm {
 		status = "disabled";
 	};
 
+	flash-led-controller {
+		compatible = "richtek,rt5033-led";
+		enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
+		flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&camera_flash_default>;
+		pinctrl-names = "default";
+
+		flash_led: led {
+			function = LED_FUNCTION_FLASH;
+			color = <LED_COLOR_ID_WHITE>;
+			flash-max-timeout-us = <544000>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -293,6 +309,13 @@ accel_int_default: accel-int-default-state {
 		bias-disable;
 	};
 
+	camera_flash_default: camera-flash-default-state {
+		pins = "gpio34", "gpio36";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	fg_alert_default: fg-alert-default-state {
 		pins = "gpio121";
 		function = "gpio";
diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
index ba652909d162..8d00a2328ca8 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
@@ -7,6 +7,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Samsung Galaxy A7 (2015)";
@@ -31,6 +32,21 @@ tz-apps@...00000 {
 		};
 	};
 
+	flash-led-controller {
+		compatible = "richtek,rt5033-led";
+		enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
+		flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&camera_flash_default>;
+		pinctrl-names = "default";
+
+		flash_led: led {
+			function = LED_FUNCTION_FLASH;
+			color = <LED_COLOR_ID_WHITE>;
+			flash-max-timeout-us = <544000>;
+		};
+	};
+
 	gpio-hall-sensor {
 		compatible = "gpio-keys";
 
@@ -360,6 +376,13 @@ accel_int_default: accel-int-default-state {
 		bias-disable;
 	};
 
+	camera_flash_default: camera-flash-default-state {
+		pins = "gpio34", "gpio36";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	fg_alert_default: fg-alert-default-state {
 		pins = "gpio121";
 		function = "gpio";
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ