From: David Heidelberg <[email protected]>

Enable the PMI8998 flash LED block and describe the white flash LED
used for the rear camera.

Configure the LED in flash mode with hardware limits matching the
original device configuration, including maximum current and timeout.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
---
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
index 070023a9813ce..e9d9842cb8674 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/dma/qcom-gpi.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
@@ -596,6 +597,19 @@ &pmi8998_charger {
        status = "okay";
 };
 
+&pmi8998_flash {
+       status = "okay";
+
+       led-1 {
+               function = LED_FUNCTION_FLASH;
+               color = <LED_COLOR_ID_WHITE>;
+               led-sources = <2>;
+               led-max-microamp = <500000>;
+               flash-max-microamp = <750000>;
+               flash-max-timeout-us = <1280000>;
+       };
+};
+
 &qupv3_id_0 {
        status = "okay";
 };

-- 
2.53.0



Reply via email to