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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201113175917.189123-4-nikitos.tr@gmail.com>
Date:   Fri, 13 Nov 2020 22:59:15 +0500
From:   nikitos.tr@...il.com
To:     agross@...nel.org, bjorn.andersson@...aro.org
Cc:     robh+dt@...nel.org, stephan@...hold.net, Michael.Srba@...nam.cz,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, phone-devel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht,
        Nikita Travkin <nikitos.tr@...il.com>
Subject: [PATCH 4/6] arm64: dts: qcom: msm8916-longcheer-l8150: Add flash LED

From: Nikita Travkin <nikitos.tr@...il.com>

L8150 uses SGM3785 Flash LED driver. It is similar to SGM3140 but
can also be controlled with PWM. Since SoC doesn't have PWM, add
led to the device tree using sgm3140 driver.

Signed-off-by: Nikita Travkin <nikitos.tr@...il.com>
---
 .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index 79a2475e3cd5..2b8670dd4b71 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -6,6 +6,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 = "Longcheer L8150";
@@ -65,6 +66,21 @@ reg_ctp: regulator-ctp {
 		pinctrl-names = "default";
 		pinctrl-0 = <&ctp_pwr_en_default>;
 	};
+
+	flash-led-controller {
+		compatible = "sgmicro,sgm3140";
+		flash-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
+		enable-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>;
+		};
+	};
 };
 
 &blsp_i2c2 {
@@ -286,6 +302,14 @@ l18 {
 };
 
 &msmgpio {
+	camera_flash_default: camera-flash-default {
+		pins = "gpio31", "gpio32";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	ctp_pwr_en_default: ctp-pwr-en-default {
 		pins = "gpio17";
 		function = "gpio";
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ