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

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

Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index a8c8706f2057d36d5ef4130f11d9ad417f93d575..f309e6ebc075a691c7a522238b4a93ba9e63f3c0 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -509,6 +509,19 @@ &pm8998_resin {
 	status = "okay";
 };
 
+&pmi8998_flash {
+	status = "okay";
+
+	led-0 {
+		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 v3 09/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Konrad Dybcio 4 months, 1 week ago
On 9/29/25 7:05 AM, Paul Sajna wrote:
> So it can be used as a flashlight
> 
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> index a8c8706f2057d36d5ef4130f11d9ad417f93d575..f309e6ebc075a691c7a522238b4a93ba9e63f3c0 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> @@ -509,6 +509,19 @@ &pm8998_resin {
>  	status = "okay";
>  };
>  
> +&pmi8998_flash {
> +	status = "okay";
> +
> +	led-0 {
> +		function = LED_FUNCTION_FLASH;
> +		color = <LED_COLOR_ID_WHITE>;
> +		led-sources = <1>;
> +		led-max-microamp = <850000>;
> +		flash-max-microamp = <850000>;

Allowing the same current for flash (brief on/off for night photos)
and LED (flashlight which you normally toggle through quick settings)
sounds no less than suspicious

Konrad

> +		flash-max-timeout-us = <500000>;
> +	};
> +};
> +
>  &pmi8998_lpg {
>  	status = "okay";
>  
>
Re: [PATCH v3 09/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Chris Brown 4 months, 1 week ago
850mA looks correct for the flash, whereas the flashlight/torch should
be 100mA based on
https://github.com/EmanuelCN/android_kernel_lge_sdm845/blob/U/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-camera/sdm845-judy-camera.dtsi
i.e. led-max-microamp = <100000>;

On Wed, 1 Oct 2025 at 05:04, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
> On 9/29/25 7:05 AM, Paul Sajna wrote:
> > So it can be used as a flashlight
> >
> > Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > index a8c8706f2057d36d5ef4130f11d9ad417f93d575..f309e6ebc075a691c7a522238b4a93ba9e63f3c0 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> > @@ -509,6 +509,19 @@ &pm8998_resin {
> >       status = "okay";
> >  };
> >
> > +&pmi8998_flash {
> > +     status = "okay";
> > +
> > +     led-0 {
> > +             function = LED_FUNCTION_FLASH;
> > +             color = <LED_COLOR_ID_WHITE>;
> > +             led-sources = <1>;
> > +             led-max-microamp = <850000>;
> > +             flash-max-microamp = <850000>;
>
> Allowing the same current for flash (brief on/off for night photos)
> and LED (flashlight which you normally toggle through quick settings)
> sounds no less than suspicious
>
> Konrad
>
> > +             flash-max-timeout-us = <500000>;
> > +     };
> > +};
> > +
> >  &pmi8998_lpg {
> >       status = "okay";
> >
> >
Re: [PATCH v3 09/11] arm64: dts: qcom: sdm845-lg-common: Add camera flash
Posted by Dmitry Baryshkov 4 months, 1 week ago
On Sun, Oct 05, 2025 at 03:35:56PM -0400, Chris Brown wrote:
> 850mA looks correct for the flash, whereas the flashlight/torch should
> be 100mA based on
> https://github.com/EmanuelCN/android_kernel_lge_sdm845/blob/U/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-camera/sdm845-judy-camera.dtsi
> i.e. led-max-microamp = <100000>;

Please post your answers before the question rather than at the top of
the email.

> On Wed, 1 Oct 2025 at 05:04, Konrad Dybcio
> <konrad.dybcio@oss.qualcomm.com> wrote:
> >
> > On 9/29/25 7:05 AM, Paul Sajna wrote:
> > > So it can be used as a flashlight
> > >
> > > +             led-max-microamp = <850000>;
> > > +             flash-max-microamp = <850000>;
> >
> > Allowing the same current for flash (brief on/off for night photos)
> > and LED (flashlight which you normally toggle through quick settings)
> > sounds no less than suspicious
> >
> > > +             flash-max-timeout-us = <500000>;

-- 
With best wishes
Dmitry