Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105552
b: refs/heads/master
c: 206c5d6
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Jul 24, 2008
1 parent f8b98a6 commit 4c1ff18
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 968910bd03b226ed410d092c2da59dffe5bfe8de
refs/heads/master: 206c5d69d0540024faffd423fc703f1e457332d7
26 changes: 22 additions & 4 deletions trunk/drivers/video/sm501fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,30 +663,48 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
sm501fb_sync_regs(fbi);
mdelay(10);

/* VBIASEN */

if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */
if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN)
control &= ~SM501_DC_PANEL_CONTROL_BIAS;
else
control |= SM501_DC_PANEL_CONTROL_BIAS;

writel(control, ctrl_reg);
sm501fb_sync_regs(fbi);
mdelay(10);
}

if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
control |= SM501_DC_PANEL_CONTROL_FPEN;
if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN)
control &= ~SM501_DC_PANEL_CONTROL_FPEN;
else
control |= SM501_DC_PANEL_CONTROL_FPEN;

writel(control, ctrl_reg);
sm501fb_sync_regs(fbi);
mdelay(10);
}
} else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) {
/* disable panel power */
if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
control &= ~SM501_DC_PANEL_CONTROL_FPEN;
if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN)
control |= SM501_DC_PANEL_CONTROL_FPEN;
else
control &= ~SM501_DC_PANEL_CONTROL_FPEN;

writel(control, ctrl_reg);
sm501fb_sync_regs(fbi);
mdelay(10);
}

if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
control &= ~SM501_DC_PANEL_CONTROL_BIAS;
if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN)
control |= SM501_DC_PANEL_CONTROL_BIAS;
else
control &= ~SM501_DC_PANEL_CONTROL_BIAS;

writel(control, ctrl_reg);
sm501fb_sync_regs(fbi);
mdelay(10);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/sm501.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ extern unsigned long sm501_gpio_get(struct device *dev,
#define SM501FB_FLAG_USE_HWACCEL (1<<3)
#define SM501FB_FLAG_PANEL_NO_FPEN (1<<4)
#define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5)
#define SM501FB_FLAG_PANEL_INV_FPEN (1<<6)
#define SM501FB_FLAG_PANEL_INV_VBIASEN (1<<7)

struct sm501_platdata_fbsub {
struct fb_videomode *def_mode;
Expand Down

0 comments on commit 4c1ff18

Please sign in to comment.