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: <YBF5fPD8Mq0K8XDn@builder.lan>
Date:   Wed, 27 Jan 2021 08:32:28 -0600
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     "N?colas F. R. A. Prado" <nfraprado@...tonmail.com>
Cc:     Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Andy Gross <agross@...nel.org>,
        Rob Herring <robh+dt@...nel.org>, linux-leds@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        Brian Masney <masneyb@...tation.org>,
        Luca Weiss <luca@...tu.xyz>,
        Russell King <linux@...linux.org.uk>,
        Georgi Djakov <georgi.djakov@...aro.org>,
        linux-kernel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht,
        lkcamp@...ts.libreplanetbr.org, andrealmeid@...labora.com
Subject: Re: [PATCH v2 4/4] ARM: dts: qcom: pm8941: Add nodes for QCOM SPMI
 Flash LEDs

On Tue 26 Jan 08:06 CST 2021, N?colas F. R. A. Prado wrote:

> Add the necessary devicetree nodes for the Qualcomm SPMI Flash LEDs
> present in PM8941.
> 
> Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@...tonmail.com>
> ---
> Changes in v2:
> - Moved from hammerhead dts to pm8941 dtsi, as it was this way downstream
> - Now using values from leds-qcom-spmi-flash.h
> 
>  arch/arm/boot/dts/qcom-pm8941.dtsi | 38 ++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
> index c1f2012d1c8b..89309d3c777c 100644
> --- a/arch/arm/boot/dts/qcom-pm8941.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
> @@ -2,6 +2,8 @@
>  #include <dt-bindings/iio/qcom,spmi-vadc.h>
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/spmi/spmi.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/leds/leds-qcom-spmi-flash.h>
>  
>  &spmi_bus {
>  
> @@ -189,5 +191,41 @@ pm8941_5vs2: 5vs2 {
>  				regulator-initial-mode = <1>;
>  			};
>  		};
> +
> +		qcom,spmi-flash@...0 {

Please avoid "qcom," in the node names.

> +			status = "okay";

The "default" status is "okay", so no need to specify that if you're not
disabling it. That said, there are 8974 devices without flash LED...

> +
> +			compatible = "qcom,spmi-flash";
> +			reg = <0xd300 0x100>;
> +			flash-boost-supply = <&pm8941_5vs1>;
> +			torch-boost-supply = <&pm8941_5v>;
> +			pm8941_flash0: led0 {
> +				led-sources = <0>;
> +				function = LED_FUNCTION_FLASH;
> +				color = <LED_COLOR_ID_WHITE>;
> +				led-max-microamp = <200000>;
> +				flash-max-microamp = <1000000>;
> +				flash-max-timeout-us = <1280000>;
> +				default-state = "off";
> +				qcom,clamp-curr = <200000>;
> +				qcom,headroom = <QCOM_SPMI_FLASH_HEADROOM_500MV>;
> +				qcom,startup-dly = <QCOM_SPMI_FLASH_STARTUP_DLY_128US>;
> +				qcom,safety-timer;

...and I would expect that at least some of these properties should be
tweaked/tuned/reviewed for each device.

So it would probably be a good idea to make the spmi-flash status
"disabled" and move some of these properties to the product .dts.

Regards,
Bjorn

> +			};
> +
> +			pm8941_flash1: led1 {
> +				led-sources = <1>;
> +				function = LED_FUNCTION_FLASH;
> +				color = <LED_COLOR_ID_WHITE>;
> +				led-max-microamp = <200000>;
> +				flash-max-microamp = <1000000>;
> +				flash-max-timeout-us = <1280000>;
> +				default-state = "off";
> +				qcom,clamp-curr = <200000>;
> +				qcom,headroom = <QCOM_SPMI_FLASH_HEADROOM_500MV>;
> +				qcom,startup-dly = <QCOM_SPMI_FLASH_STARTUP_DLY_128US>;
> +				qcom,safety-timer;
> +			};
> +		};
>  	};
>  };
> -- 
> 2.30.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ