static void ns115bl_late_resume(struct early_suspend *h) { struct ns115_backlight *bl; bl = container_of(h, struct ns115_backlight, early_suspend); if(hwversion & HWVERSION_TC103) { if(twx_init==0) { lvds_init(); twx_init = 1; bl_delay(100); } gpio_request(GPIO_BKL_ON, "BL-ON"); gpio_direction_output(GPIO_BKL_ON,1); gpio_free(GPIO_BKL_ON); } else { ns115bl_blank(bl, FB_BLANK_UNBLANK); } }
static int lvds_on(struct platform_device *pdev) { int ret = 0; struct msm_fb_data_type *mfd; unsigned long panel_pixclock_freq = 0; mfd = platform_get_drvdata(pdev); if (lvds_pdata && lvds_pdata->lcdc_get_clk) panel_pixclock_freq = lvds_pdata->lcdc_get_clk(); if (!panel_pixclock_freq) panel_pixclock_freq = mfd->fbi->var.pixclock; #ifdef CONFIG_MSM_BUS_SCALING mdp_bus_scale_update_request(2); #endif mfd = platform_get_drvdata(pdev); if (lvds_clk) { mfd->fbi->var.pixclock = clk_round_rate(lvds_clk, mfd->fbi->var.pixclock); ret = clk_set_rate(lvds_clk, mfd->fbi->var.pixclock); if (ret) { pr_err("%s: Can't set lvds clock to rate %u\n", __func__, mfd->fbi->var.pixclock); goto out; } clk_prepare_enable(lvds_clk); } if (lvds_pdata && lvds_pdata->lcdc_power_save) lvds_pdata->lcdc_power_save(1); if (lvds_pdata && lvds_pdata->lcdc_gpio_config) ret = lvds_pdata->lcdc_gpio_config(1); lvds_init(mfd); ret = panel_next_on(pdev); out: return ret; }