rk3188 lcdc:implement rk3188_lcdc_shutdown
authoryxj <yxj@rock-chips.com>
Fri, 1 Feb 2013 02:23:38 +0000 (10:23 +0800)
committeryxj <yxj@rock-chips.com>
Fri, 1 Feb 2013 08:58:42 +0000 (16:58 +0800)
drivers/video/rockchip/lcdc/rk3188_lcdc.c

index d60fa5d56b8b59f6e3d18c93143ec4c360dc277d..a67bcdc07aa147b77ecbfff5371709c3c2076e37 100644 (file)
@@ -1385,7 +1385,14 @@ static int __devexit rk3188_lcdc_remove(struct platform_device *pdev)
 
 static void rk3188_lcdc_shutdown(struct platform_device *pdev)
 {
-       
+       struct rk3188_lcdc_device *lcdc_dev = platform_get_drvdata(pdev);
+       if(lcdc_dev->driver.cur_screen->standby) //standby the screen if necessary
+               lcdc_dev->driver.cur_screen->standby(1);
+       if(lcdc_dev->driver.screen_ctr_info->io_disable) //power off the screen if necessary
+               lcdc_dev->driver.screen_ctr_info->io_disable();
+       if(lcdc_dev->driver.cur_screen->sscreen_set) //turn off  lvds if necessary
+               lcdc_dev->driver.cur_screen->sscreen_set(lcdc_dev->driver.cur_screen , 0);
+       rk_fb_unregister(&(lcdc_dev->driver));  
 }
 static struct platform_driver rk3188_lcdc_driver = {
        .probe          = rk3188_lcdc_probe,