[PATCH 04/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash

Paul Sajna posted 11 patches 2 weeks, 4 days ago
There is a newer version of this series
[PATCH 04/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Paul Sajna 2 weeks, 4 days ago
Add the camera flash so it can be used as a flashlight

Co-authored-by: Amir Dahan <system64fumo@protonmail.com>
Signed-off-by: Amir Dahan <system64fumo@protonmail.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index d6129ce03f537f0c8c78c2ae5f39be6146cab7dc..df826bca2bef5e3f85cf49708020a47b8d6bd8bb 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -604,6 +604,20 @@ vol_up_pin_a: vol-up-active-state {
 	};
 };
 
+&pmi8998_flash {
+	status = "okay";
+
+	led-0 {
+		label = "flash";
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;
+		led-sources = <1>;
+		led-max-microamp = <850000>;
+		flash-max-microamp = <850000>;
+		flash-max-timeout-us = <500000>;
+	};
+};
+
 &pmi8998_lpg {
 	status = "okay";
 

-- 
2.51.0
Re: [PATCH 04/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Dmitry Baryshkov 2 weeks, 3 days ago
On Sat, Sep 13, 2025 at 04:56:37PM -0700, Paul Sajna wrote:
> Add the camera flash so it can be used as a flashlight
> 
> Co-authored-by: Amir Dahan <system64fumo@protonmail.com>
> Signed-off-by: Amir Dahan <system64fumo@protonmail.com>
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> index d6129ce03f537f0c8c78c2ae5f39be6146cab7dc..df826bca2bef5e3f85cf49708020a47b8d6bd8bb 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> @@ -604,6 +604,20 @@ vol_up_pin_a: vol-up-active-state {
>  	};
>  };
>  
> +&pmi8998_flash {
> +	status = "okay";
> +
> +	led-0 {
> +		label = "flash";

Not allowed, please drop.

> +		function = LED_FUNCTION_FLASH;
> +		color = <LED_COLOR_ID_WHITE>;
> +		led-sources = <1>;
> +		led-max-microamp = <850000>;
> +		flash-max-microamp = <850000>;
> +		flash-max-timeout-us = <500000>;
> +	};
> +};
> +
>  &pmi8998_lpg {
>  	status = "okay";
>  
> 
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry
Re: [PATCH 04/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Dmitry Baryshkov 2 weeks, 3 days ago
On Mon, Sep 15, 2025 at 03:25:45AM +0300, Dmitry Baryshkov wrote:
> On Sat, Sep 13, 2025 at 04:56:37PM -0700, Paul Sajna wrote:
> > Add the camera flash so it can be used as a flashlight
> > 
> > Co-authored-by: Amir Dahan <system64fumo@protonmail.com>
> > Signed-off-by: Amir Dahan <system64fumo@protonmail.com>
> > Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > index d6129ce03f537f0c8c78c2ae5f39be6146cab7dc..df826bca2bef5e3f85cf49708020a47b8d6bd8bb 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > @@ -604,6 +604,20 @@ vol_up_pin_a: vol-up-active-state {
> >  	};
> >  };
> >  
> > +&pmi8998_flash {
> > +	status = "okay";
> > +
> > +	led-0 {
> > +		label = "flash";
> 
> Not allowed, please drop.

Okay, allowed, but still please drop. See how it's handled for other
boards.

> 
> > +		function = LED_FUNCTION_FLASH;
> > +		color = <LED_COLOR_ID_WHITE>;
> > +		led-sources = <1>;
> > +		led-max-microamp = <850000>;
> > +		flash-max-microamp = <850000>;
> > +		flash-max-timeout-us = <500000>;
> > +	};
> > +};
> > +
> >  &pmi8998_lpg {
> >  	status = "okay";
> >  
> > 
> > -- 
> > 2.51.0
> > 
> 
> -- 
> With best wishes
> Dmitry

-- 
With best wishes
Dmitry