• Peter Ujfalusi's avatar
    backlight: gpio-backlight: Correct initial power state handling · ec665b75
    Peter Ujfalusi authored
    The default-on property - or the def_value via legacy pdata) should be
    handled as:
    if it is 1, the backlight must be enabled (kept enabled)
    if it is 0, the backlight must be disabled (kept disabled)
    
    This only works for the case when default-on is set. If it is not set then
    the brightness of the backlight is set to 0. Now if the backlight is
    enabled by external driver (graphics) the backlight will stay disabled since
    the brightness is configured as 0. The backlight will not turn on.
    
    In order to minimize screen flickering during device boot:
    
    The initial brightness should be set to 1.
    
    If booted in non DT mode or no phandle link to the backlight node:
    follow the def_value/default-on to select UNBLANK or POWERDOWN
    
    If in DT boot we have phandle link then leave the GPIO in a state which the
    bootloader left it and let the user of the backlight to configure it
    further.
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    ec665b75
gpio_backlight.c 4.5 KB