msm_fb: display: add setting gpio-controlled backlight logic

For the panels which backlight is controlled by gpio, add this logic
in driver to turn on/off backlight, instead of calling board panel
on/off functions, to avoid garbage display due to early backlight
turn-on.

(cherry picked from commit 3eebb2e33570e32d11a757e493e12a8e79e08d6f)

CRs-fixed: 408728
Change-Id: I6f1b9bd78d96dbf1492e854edd59b05f8dec205f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This commit is contained in:
Huaibin Yang 2012-11-08 14:21:41 -08:00 committed by Stephen Boyd
parent ca2b4a561c
commit 7f3c6fd853

View file

@ -465,6 +465,12 @@ static void mipi_novatek_set_backlight(struct msm_fb_data_type *mfd)
{
struct dcs_cmd_req cmdreq;
if (mipi_novatek_pdata &&
mipi_novatek_pdata->gpio_set_backlight) {
mipi_novatek_pdata->gpio_set_backlight(mfd->bl_level);
return;
}
if ((mipi_novatek_pdata->enable_wled_bl_ctrl)
&& (wled_trigger_initialized)) {
led_trigger_event(bkl_led_trigger, mfd->bl_level);