diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-24 00:31:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:40 -0400 |
commit | 206c5d69d0540024faffd423fc703f1e457332d7 (patch) | |
tree | d635ae03771773eaae3f56bcd967dd5781244a5a /drivers/video/sm501fb.c | |
parent | 968910bd03b226ed410d092c2da59dffe5bfe8de (diff) |
sm501: add inversion controls for VBIASEN and FPEN
Add flags to allow the driver to invert the sense of both VBIASEN and FPEN
signals comming from the SM501.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/sm501fb.c')
-rw-r--r-- | drivers/video/sm501fb.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 15d4a768b1f6..122a0f8495c8 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -663,15 +663,25 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
663 | sm501fb_sync_regs(fbi); | 663 | sm501fb_sync_regs(fbi); |
664 | mdelay(10); | 664 | mdelay(10); |
665 | 665 | ||
666 | /* VBIASEN */ | ||
667 | |||
666 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { | 668 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
667 | control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ | 669 | if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN) |
670 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; | ||
671 | else | ||
672 | control |= SM501_DC_PANEL_CONTROL_BIAS; | ||
673 | |||
668 | writel(control, ctrl_reg); | 674 | writel(control, ctrl_reg); |
669 | sm501fb_sync_regs(fbi); | 675 | sm501fb_sync_regs(fbi); |
670 | mdelay(10); | 676 | mdelay(10); |
671 | } | 677 | } |
672 | 678 | ||
673 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { | 679 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
674 | control |= SM501_DC_PANEL_CONTROL_FPEN; | 680 | if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN) |
681 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; | ||
682 | else | ||
683 | control |= SM501_DC_PANEL_CONTROL_FPEN; | ||
684 | |||
675 | writel(control, ctrl_reg); | 685 | writel(control, ctrl_reg); |
676 | sm501fb_sync_regs(fbi); | 686 | sm501fb_sync_regs(fbi); |
677 | mdelay(10); | 687 | mdelay(10); |
@@ -679,14 +689,22 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
679 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { | 689 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { |
680 | /* disable panel power */ | 690 | /* disable panel power */ |
681 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { | 691 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
682 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; | 692 | if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN) |
693 | control |= SM501_DC_PANEL_CONTROL_FPEN; | ||
694 | else | ||
695 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; | ||
696 | |||
683 | writel(control, ctrl_reg); | 697 | writel(control, ctrl_reg); |
684 | sm501fb_sync_regs(fbi); | 698 | sm501fb_sync_regs(fbi); |
685 | mdelay(10); | 699 | mdelay(10); |
686 | } | 700 | } |
687 | 701 | ||
688 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { | 702 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
689 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; | 703 | if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN) |
704 | control |= SM501_DC_PANEL_CONTROL_BIAS; | ||
705 | else | ||
706 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; | ||
707 | |||
690 | writel(control, ctrl_reg); | 708 | writel(control, ctrl_reg); |
691 | sm501fb_sync_regs(fbi); | 709 | sm501fb_sync_regs(fbi); |
692 | mdelay(10); | 710 | mdelay(10); |