Hello Foks, I am trying to control display brightness by doing below changes in DTSI and back-light pwm driver with my Kernel version 4.9.87, but now only i can do on/off display through sys interface.
#echo 0 > /sys/class/backlight/backlight/brightness
//display OFF
# cat /sys/class/backlight/backlight/brightness
0
# echo 1 > /sys/class/backlight/backlight/brightness
//display ON
# cat /sys/class/backlight/backlight/brightness
1 # echo 2 >
/sys/class/backlight/backlight/brightness
//brightness is not changing
# cat /sys/class/backlight/backlight/brightness
2 # echo 3 >
/sys/class/backlight/backlight/brightness
//brightness is not changing
# cat /sys/class/backlight/backlight/brightness
3
My dtsi changes areā¦
&backlight {
compatible = "pwm-backlight";
#if 0 /* PWM polarity: if 1 is brightest */
#if 0 /* Fusion 7 needs 10kHz PWM frequency */
pwms = <&pwm4 0 100000>;
#endif
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
#else /* PWM plarity: if 0 is brightest */
brightness-levels = <0 127 191 223 239 247 251 255>;
default-brightness-level = <1>;
#endif
enable-gpios = <&gpio1 6 0>;
lcd-pwr-en-gpio = <&gpio1 9 0>;
status = "okay";
};