Ejemplo n.º 1
0
void s3cfb_early_suspend(struct early_suspend *h)
{
	struct s3cfb_global *fbdev =
		container_of(h, struct s3cfb_global, early_suspend);
	struct s3c_platform_fb *pdata = to_fb_plat(fbdev->dev);
	struct platform_device *pdev = to_platform_device(fbdev->dev);

	pr_debug("s3cfb_early_suspend is called\n");

	if (pdata->backlight_off)
		pdata->backlight_off(pdev);
	else if (pdata->backlight_onoff)
		pdata->backlight_onoff(pdev, 0);

	s3cfb_display_off(fbdev);
	clk_disable(fbdev->clock);
#if defined(CONFIG_FB_S3C_TL2796)
	lcd_cfg_gpio_early_suspend();
#endif

	regulator_disable(fbdev->regulator);

	if (pdata->lcd_off)
		pdata->lcd_off(pdev);

	if (pdata->cfg_gpio)
		s3cfb_earlysuspend_cfg_gpio(pdev);

	return ;
}
Ejemplo n.º 2
0
void s3cfb_early_suspend(struct early_suspend *h)
{
	struct s3cfb_global *fbdev =
		container_of(h, struct s3cfb_global, early_suspend);
	struct s3c_platform_fb *pdata = to_fb_plat(fbdev->dev);
	struct platform_device *pdev = to_platform_device(fbdev->dev);

	pr_debug("s3cfb_early_suspend is called\n");

#if 0 /*to be checked*/
	/* backlight_onoff function is only used for backlight_off */
	if (pdata->backlight_onoff)
		pdata->backlight_onoff(pdev, false);
#else

#if defined (CONFIG_FB_S3C_LTE480WV)
	if (pdata->backlight_off)
		pdata->backlight_off(pdev);
#endif

#endif

	s3cfb_display_off(fbdev);
	clk_disable(fbdev->clock);
#if defined(CONFIG_FB_S3C_TL2796)
	lcd_cfg_gpio_early_suspend();
#endif

	
	regulator_disable(fbdev->regulator);
#if defined (CONFIG_FB_S3C_LTE480WV)	//=//
	//s3cfb_lcd_off(pdev);
	if(pdata->lcd_off)
		pdata->lcd_off(pdev);
	if (pdata->cfg_gpio)
	{		
		s3cfb_earlysuspend_cfg_gpio(pdev);
	}
#endif

	return ;
}