aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sm501fb.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 58f200c69be3..e1d6085bc347 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -641,6 +641,7 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
641{ 641{
642 unsigned long control; 642 unsigned long control;
643 void __iomem *ctrl_reg = fbi->regs + SM501_DC_PANEL_CONTROL; 643 void __iomem *ctrl_reg = fbi->regs + SM501_DC_PANEL_CONTROL;
644 struct sm501_platdata_fbsub *pd = fbi->pdata->fb_pnl;
644 645
645 control = readl(ctrl_reg); 646 control = readl(ctrl_reg);
646 647
@@ -657,26 +658,34 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
657 sm501fb_sync_regs(fbi); 658 sm501fb_sync_regs(fbi);
658 mdelay(10); 659 mdelay(10);
659 660
660 control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ 661 if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) {
661 writel(control, ctrl_reg); 662 control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */
662 sm501fb_sync_regs(fbi); 663 writel(control, ctrl_reg);
663 mdelay(10); 664 sm501fb_sync_regs(fbi);
664 665 mdelay(10);
665 control |= SM501_DC_PANEL_CONTROL_FPEN; 666 }
666 writel(control, ctrl_reg);
667 667
668 if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) {
669 control |= SM501_DC_PANEL_CONTROL_FPEN;
670 writel(control, ctrl_reg);
671 sm501fb_sync_regs(fbi);
672 mdelay(10);
673 }
668 } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { 674 } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) {
669 /* disable panel power */ 675 /* disable panel power */
676 if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) {
677 control &= ~SM501_DC_PANEL_CONTROL_FPEN;
678 writel(control, ctrl_reg);
679 sm501fb_sync_regs(fbi);
680 mdelay(10);
681 }
670 682
671 control &= ~SM501_DC_PANEL_CONTROL_FPEN; 683 if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) {
672 writel(control, ctrl_reg); 684 control &= ~SM501_DC_PANEL_CONTROL_BIAS;
673 sm501fb_sync_regs(fbi); 685 writel(control, ctrl_reg);
674 mdelay(10); 686 sm501fb_sync_regs(fbi);
675 687 mdelay(10);
676 control &= ~SM501_DC_PANEL_CONTROL_BIAS; 688 }
677 writel(control, ctrl_reg);
678 sm501fb_sync_regs(fbi);
679 mdelay(10);
680 689
681 control &= ~SM501_DC_PANEL_CONTROL_DATA; 690 control &= ~SM501_DC_PANEL_CONTROL_DATA;
682 writel(control, ctrl_reg); 691 writel(control, ctrl_reg);