there are often many solutions for a particular problem. Downside is screen blanking, were your backlight remains on.I was able to get something working by utilizing the pwm-leds driver instead:Then I can control it via the /sys/class/leds/backlight interface. It doesn't integrate with DPMS, but at least I can control the brightness.Code:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2835"; fragment@0 { target = <&gpio>; __overlay__ { pwm_pins: pwm_pins { brcm,pins = <18 19>; brcm,function = <2>; brcm,pull = <0>; }; }; }; fragment@1 { target = <&pwm>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; status = "okay"; }; }; fragment@2 { target-path = "/"; __overlay__ { backlight: backlight { compatible = "pwm-leds"; status = "okay"; backlight_led: backlight_led { label = "backlight"; pwms = <&pwm 0 5000000>; linux,default-trigger = "default-on"; brightness = <255>; }; }; }; };};
Add the PWM polarity to make sure it still works on 6.6 kernel.
Code:
pwms = <&pwm 0 5000000 0>;
Statistics: Posted by aBUGSworstnightmare — Thu Jan 18, 2024 6:19 am