The field pwm_backlight->backlight.brightness_max should be the maximum allowed brightness value for the backlight, not the max index of the array 'pwm_backlight->levels[]'. --- drivers/video/backlight-pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight-pwm.c b/drivers/video/backlight-pwm.c index 3024ec6..53cf4e9 100644 --- a/drivers/video/backlight-pwm.c +++ b/drivers/video/backlight-pwm.c @@ -160,7 +160,7 @@ static int pwm_backlight_parse_dt(struct device_d *dev, return ret; pwm_backlight->backlight.brightness_default = value; - pwm_backlight->backlight.brightness_max--; + pwm_backlight->backlight.brightness_max = pwm_backlight->scale; } pwm_backlight->enable_gpio = of_get_named_gpio_flags(node, "enable-gpios", 0, &flags); -- 2.9.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox