Hi
I want to set brightness by setting /sys/class/backlight/backlight/brightness.
But I find the max_brightness is 7,which means that the level is from 0 to 7.
I want to add more level (from 0 to 100) ,but how to know which file is it in ../arch/arm/dts/
I also find some files, but the levels they define are not suitable.
e.g.
# they have 9 levels not 8 levels
arch/arm/dts/am437x-sk-evm.dts:35: brightness-levels = <0 51 53 56 62 75 101 152 255>;
arch/arm/dts/am437x-gp-evm.dts:63: brightness-levels = <0 51 53 56 62 75 101 152 255>;
arch/arm/dts/am335x-evm.dts:105: brightness-levels = <0 51 53 56 62 75 101 152 255>;
Regards
Mihan
So where is the level of backlight defined?
I know I can change the backlight by
/sys/class/backlight/backlight/brightness
but I want to change the
/sys/class/backlight/backlight/max_brightness
so that I can change the backlight more smoothly.
Hi 铭恒 李,
After changing the brightness-level as suggested in the previous comment, the max_brigthtness will be automatically calculated as per number of levels defined in brightness-level.
Let's say you added brightness-level ranging from 0 to 255 in 100 different levels like:
0 5 10 15 ....255 //100 different numbers(level)
The max-brightness will have value 100.
Regards,
Karan Gajjar
Hi 铭恒 李 ,
You can refer below document for configuring backlight in device tree.
https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
As, you can see in node "brightness-level" you can add numbers ranging from 0 to 255 at different levels that you want. And set default-brigthness-level as well.
After compiling and flashing you can change the brightness of backlight from sysfs.
Regards,
Karan Gajjar