[U-Boot] [PATCH v2] sunxi: display: Use PWM to drive backlight where applicable
Simon Glass
sjg at chromium.org
Sat Aug 27 18:06:20 CEST 2016
Hi Hans,
On 26 August 2016 at 08:21, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi,
>
>
> On 26-08-16 16:15, Peter Korsgaard wrote:
>>>>>>>
>>>>>>> "Hans" == Hans de Goede <hdegoede at redhat.com> writes:
>>
>>
>> > When the backlight's pwm input is connected to a pwm output of the SoC,
>> > actually use pwm to drive the backlight.
>>
>> > The mean reason for doing this is to fix the backlight turning off
>> > for aprox. 1 second while the kernel is booting. This is caused by
>> > the kernel actually using pwm to drive the backlight, so that it
>> > can dim the backlight. First the pwm driver loads and switches the
>> > pinmux for the pin driving the backlight's pwm input to the pwm
>> > controller. Then about 1s later the actual backlight driver loads
>> > and tells the pwm driver to actually update the pwm settings, which
>> > have a power-on-reset value of "off".
>>
>> > An additional advantage is that this allows us to initatiate the
>> > backlight at 80%, which is the kernel default, avoiding a brightness
>> > change while the kernel loads.
>>
>> > +++ b/drivers/video/sunxi_display.c
>> > @@ -12,6 +12,7 @@
>> > #include <asm/arch/clock.h>
>> > #include <asm/arch/display.h>
>> > #include <asm/arch/gpio.h>
>> > +#include <asm/arch/pwm.h>
>> > #include <asm/global_data.h>
>> > #include <asm/gpio.h>
>> > #include <asm/io.h>
>> > @@ -34,7 +35,6 @@
>> > #define PWM_ON 1
>> > #define PWM_OFF 0
>> > #endif
>> > -
>>
>> Unrelated white space change. Other than that:
>
>
> Oops, fixed locally.
>
>> Reviewed by: Peter Korsgaard <peter at korsgaard.com>
>
>
> Thank you.
Can this move to driver model for the PWM, and for the display for that matter?
>
> Regards,
>
> Hans
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Simon
More information about the U-Boot
mailing list