Commit cdc83ae2 authored by Ben Dooks's avatar Ben Dooks Committed by Linus Torvalds

SM501: reverse FPEN/VBIASEN flags behaviour

To keep backwards compatibility, reverse the meanings of these flags so
that when they are not set, the driver uses the original behvaiour.
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd94b9db
...@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) ...@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
sm501fb_sync_regs(fbi); sm501fb_sync_regs(fbi);
mdelay(10); mdelay(10);
if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */
writel(control, ctrl_reg); writel(control, ctrl_reg);
sm501fb_sync_regs(fbi); sm501fb_sync_regs(fbi);
mdelay(10); mdelay(10);
} }
if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
control |= SM501_DC_PANEL_CONTROL_FPEN; control |= SM501_DC_PANEL_CONTROL_FPEN;
writel(control, ctrl_reg); writel(control, ctrl_reg);
sm501fb_sync_regs(fbi); sm501fb_sync_regs(fbi);
...@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) ...@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
} }
} else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) {
/* disable panel power */ /* disable panel power */
if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
control &= ~SM501_DC_PANEL_CONTROL_FPEN; control &= ~SM501_DC_PANEL_CONTROL_FPEN;
writel(control, ctrl_reg); writel(control, ctrl_reg);
sm501fb_sync_regs(fbi); sm501fb_sync_regs(fbi);
mdelay(10); mdelay(10);
} }
if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
control &= ~SM501_DC_PANEL_CONTROL_BIAS; control &= ~SM501_DC_PANEL_CONTROL_BIAS;
writel(control, ctrl_reg); writel(control, ctrl_reg);
sm501fb_sync_regs(fbi); sm501fb_sync_regs(fbi);
......
...@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, ...@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(struct device *dev,
#define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1)
#define SM501FB_FLAG_USE_HWCURSOR (1<<2) #define SM501FB_FLAG_USE_HWCURSOR (1<<2)
#define SM501FB_FLAG_USE_HWACCEL (1<<3) #define SM501FB_FLAG_USE_HWACCEL (1<<3)
#define SM501FB_FLAG_PANEL_USE_FPEN (1<<4) #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4)
#define SM501FB_FLAG_PANEL_USE_VBIASEN (1<<5) #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5)
struct sm501_platdata_fbsub { struct sm501_platdata_fbsub {
struct fb_videomode *def_mode; struct fb_videomode *def_mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment