int rk2928_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv)
{
struct rk2928_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk2928_lcdc_device,driver);
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(1);
+ if(dev_drv->screen_ctr_info->io_disable)
+ dev_drv->screen_ctr_info->io_disable();
if(dev_drv->cur_screen->sscreen_set)
dev_drv->cur_screen->sscreen_set(dev_drv->cur_screen , 0);
int rk2928_lcdc_early_resume(struct rk_lcdc_device_driver *dev_drv)
{
struct rk2928_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk2928_lcdc_device,driver);
+
+ if(dev_drv->screen_ctr_info->io_enable) //power on
+ dev_drv->screen_ctr_info->io_enable();
if(!lcdc_dev->clk_on)
{
if(dev_drv->cur_screen->sscreen_set)
dev_drv->cur_screen->sscreen_set(dev_drv->cur_screen , 1);
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(0); //screen wake up
return 0;
ret = -EBUSY;
goto err3;
}
+
+ if(screen_ctr_info->set_screen_info)
+ {
+ screen_ctr_info->set_screen_info(screen0,screen_ctr_info->lcd_info);
+ if(SCREEN_NULL==screen0->type)
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ }
+ if(screen_ctr_info->io_init)
+ screen_ctr_info->io_init(NULL);
+ }
+ else
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ goto err4;
+ }
+
ret = rk_fb_register(&(lcdc_dev->driver),&lcdc_driver,lcdc_dev->id);
if(ret < 0)
{
int rk3066b_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv)
{
struct rk3066b_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk3066b_lcdc_device,driver);
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(1);
+ if(dev_drv->screen_ctr_info->io_disable)
+ dev_drv->screen_ctr_info->io_disable();
spin_lock(&lcdc_dev->reg_lock);
if(likely(lcdc_dev->clk_on))
int rk3066b_lcdc_early_resume(struct rk_lcdc_device_driver *dev_drv)
{
struct rk3066b_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk3066b_lcdc_device,driver);
+
+ if(dev_drv->screen_ctr_info->io_enable) //power on
+ dev_drv->screen_ctr_info->io_enable();
if(!lcdc_dev->clk_on)
{
}
lcdc_dev->clk_on = 1;
spin_unlock(&lcdc_dev->reg_lock);
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(0); //screen wake up
return 0;
}
ret = -EBUSY;
goto err3;
}
+
+ if(screen_ctr_info->set_screen_info)
+ {
+ screen_ctr_info->set_screen_info(screen,screen_ctr_info->lcd_info);
+ if(SCREEN_NULL==screen->type)
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ }
+ if(screen_ctr_info->io_init)
+ screen_ctr_info->io_init(NULL);
+ }
+ else
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ goto err4;
+ }
+
ret = rk_fb_register(&(lcdc_dev->driver),&lcdc_driver,lcdc_dev->id);
if(ret < 0)
{
int rk30_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv)
{
struct rk30_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk30_lcdc_device,driver);
+
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(1);
+ if(dev_drv->screen_ctr_info->io_disable)
+ dev_drv->screen_ctr_info->io_disable();
spin_lock(&lcdc_dev->reg_lock);
if(likely(lcdc_dev->clk_on))
int i=0;
int __iomem *c;
int v;
+
+ if(dev_drv->screen_ctr_info->io_enable) //power on
+ dev_drv->screen_ctr_info->io_enable();
+
if(!lcdc_dev->clk_on)
{
rk30_lcdc_clk_enable(lcdc_dev);
if(!lcdc_dev->atv_layer_cnt)
rk30_lcdc_clk_disable(lcdc_dev);
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(0); //screen wake up
+
return 0;
}
static irqreturn_t rk30_lcdc_isr(int irq, void *dev_id)
ret = -EBUSY;
goto err3;
}
+
+ if(screen_ctr_info->set_screen_info)
+ {
+ screen_ctr_info->set_screen_info(screen,screen_ctr_info->lcd_info);
+ if(SCREEN_NULL==screen->type)
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ }
+ if(screen_ctr_info->io_init)
+ screen_ctr_info->io_init(NULL);
+ }
+ else
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ goto err4;
+ }
+
ret = rk_fb_register(&(lcdc_dev->driver),&lcdc_driver,lcdc_dev->id);
if(ret < 0)
{
struct rk3188_lcdc_device *lcdc_dev =
container_of(dev_drv,struct rk3188_lcdc_device,driver);
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(1);
+ if(dev_drv->screen_ctr_info->io_disable)
+ dev_drv->screen_ctr_info->io_disable();
+
spin_lock(&lcdc_dev->reg_lock);
if(likely(lcdc_dev->clk_on))
{
int i=0;
int __iomem *c;
int v;
+
+ if(dev_drv->screen_ctr_info->io_enable) //power on
+ dev_drv->screen_ctr_info->io_enable();
+
if(!lcdc_dev->clk_on)
{
rk3188_lcdc_clk_enable(lcdc_dev);
if(!lcdc_dev->atv_layer_cnt)
rk3188_lcdc_clk_disable(lcdc_dev);
+
+ if(dev_drv->screen0->standby)
+ dev_drv->screen0->standby(0); //screen wake up
return 0;
}
ret = -EBUSY;
goto err3;
}
+
+ if(screen_ctr_info->set_screen_info)
+ {
+ screen_ctr_info->set_screen_info(screen,screen_ctr_info->lcd_info);
+ if(SCREEN_NULL==screen->type)
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ }
+ if(screen_ctr_info->io_init)
+ screen_ctr_info->io_init(NULL);
+ }
+ else
+ {
+ printk(KERN_WARNING "no display device on lcdc%d!?\n",lcdc_dev->id);
+ ret = -ENODEV;
+ goto err4;
+ }
+
ret = rk_fb_register(&(lcdc_dev->driver),&lcdc_driver,lcdc_dev->id);
if(ret < 0)
{
}
lcdc_id = i;
init_lcdc_device_driver(dev_drv, def_drv,id);
- if(dev_drv->screen_ctr_info->set_screen_info)
- {
- dev_drv->screen_ctr_info->set_screen_info(dev_drv->cur_screen,
- dev_drv->screen_ctr_info->lcd_info);
- if(SCREEN_NULL==dev_drv->cur_screen->type)
- {
- printk(KERN_WARNING "no display device on lcdc%d!?\n",dev_drv->id);
- fb_inf->num_lcdc--;
- return -ENODEV;
- }
- if(dev_drv->screen_ctr_info->io_init)
- dev_drv->screen_ctr_info->io_init(NULL);
- }
- else
- {
- printk(KERN_WARNING "no display device on lcdc%d!?\n",dev_drv->id);
- fb_inf->num_lcdc--;
- return -ENODEV;
- }
-
+
dev_drv->init_lcdc(dev_drv);
/************fb set,one layer one fb ***********/
dev_drv->fb_index_base = fb_inf->num_fb;
{
if (!inf->lcdc_dev_drv[i])
continue;
- if(inf->lcdc_dev_drv[i]->screen0->standby)
- inf->lcdc_dev_drv[i]->screen0->standby(1);
- if(inf->lcdc_dev_drv[i]->screen_ctr_info->io_disable)
- inf->lcdc_dev_drv[i]->screen_ctr_info->io_disable();
+
inf->lcdc_dev_drv[i]->suspend(inf->lcdc_dev_drv[i]);
}
}
{
if (!inf->lcdc_dev_drv[i])
continue;
- if(inf->lcdc_dev_drv[i]->screen_ctr_info->io_enable) //power on
- inf->lcdc_dev_drv[i]->screen_ctr_info->io_enable();
inf->lcdc_dev_drv[i]->resume(inf->lcdc_dev_drv[i]); // data out
-
- if(inf->lcdc_dev_drv[i]->screen0->standby)
- inf->lcdc_dev_drv[i]->screen0->standby(0); //screen wake up
-
-
}
}