]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: sc8280xp-x13s: enable camera privacy indicator
authorAleksandrs Vinarskis <alex@vinarskis.com>
Wed, 10 Sep 2025 12:01:11 +0000 (14:01 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 28 Oct 2025 03:39:34 +0000 (22:39 -0500)
Leverage newly introduced 'leds' and 'led-names' properties to pass
indicator's phandle and function to v4l2 subnode. The latter supports
privacy led since couple of years ago under 'privacy-led' designation.
Unlike initially proposed trigger-source based approach, this solution
cannot be easily bypassed from userspace, thus reducing privacy
concerns.

Signed-off-by: Aleksandrs Vinarskis <alex@vinarskis.com>
Tested-by: Steev Klimaszewski <threeway@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250910-leds-v5-4-bb90a0f897d5@vinarskis.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts

index 637430719e6d7d3c0eeb4abf2b80eea1f8289530..3b3f7137689a6fa292ffe4fec8c1d1f20ee525bc 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&cam_indicator_en>;
 
-               led-camera-indicator {
-                       label = "white:camera-indicator";
+               privacy_led: privacy-led {
                        function = LED_FUNCTION_INDICATOR;
                        color = <LED_COLOR_ID_WHITE>;
                        gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "none";
                        default-state = "off";
-                       /* Reuse as a panic indicator until we get a "camera on" trigger */
                        panic-indicator;
                };
        };
                pinctrl-names = "default";
                pinctrl-0 = <&cam_rgb_default>;
 
+               leds = <&privacy_led>;
+               led-names = "privacy";
+
                clocks = <&camcc CAMCC_MCLK3_CLK>;
 
                orientation = <0>;      /* Front facing */