All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-fbdev@fluff.org>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: akpm@linux-foundation.org, Ben Dooks <ben-linux@fluff.org>,
	arnaud.patard@rtp-net.org
Subject: [patch 1/5] SM501: Reverse FPEN/VBIASEN flags behaviour.
Date: Tue, 20 May 2008 13:49:55 +0100	[thread overview]
Message-ID: <20080520125029.967251370@fluff.org.uk> (raw)
In-Reply-To: 20080520124954.001898813@fluff.org.uk

[-- Attachment #1: simtec/simtec-drivers-fb-sm501-revertbehaviour.patch --]
[-- Type: text/plain, Size: 2702 bytes --]

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: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.25-rc9-quilt2/drivers/video/sm501fb.c
===================================================================
--- linux-2.6.25-rc9-quilt2.orig/drivers/video/sm501fb.c	2008-04-14 16:41:21.000000000 +0100
+++ linux-2.6.25-rc9-quilt2/drivers/video/sm501fb.c	2008-04-15 00:23:19.000000000 +0100
@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct s
 		sm501fb_sync_regs(fbi);
 		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 */
 			writel(control, ctrl_reg);
 			sm501fb_sync_regs(fbi);
 			mdelay(10);
 		}
 
-		if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) {
+		if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
 			control |= SM501_DC_PANEL_CONTROL_FPEN;
 			writel(control, ctrl_reg);
 			sm501fb_sync_regs(fbi);
@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct s
 		}
 	} else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) {
 		/* 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;
 			writel(control, ctrl_reg);
 			sm501fb_sync_regs(fbi);
 			mdelay(10);
 		}
 
-		if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) {
+		if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
 			control &= ~SM501_DC_PANEL_CONTROL_BIAS;
 			writel(control, ctrl_reg);
 			sm501fb_sync_regs(fbi);
Index: linux-2.6.25-rc9-quilt2/include/linux/sm501.h
===================================================================
--- linux-2.6.25-rc9-quilt2.orig/include/linux/sm501.h	2008-04-15 00:11:29.000000000 +0100
+++ linux-2.6.25-rc9-quilt2/include/linux/sm501.h	2008-04-15 00:23:19.000000000 +0100
@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(stru
 #define SM501FB_FLAG_DISABLE_AT_EXIT	(1<<1)
 #define SM501FB_FLAG_USE_HWCURSOR	(1<<2)
 #define SM501FB_FLAG_USE_HWACCEL	(1<<3)
-#define SM501FB_FLAG_PANEL_USE_FPEN	(1<<4)
-#define SM501FB_FLAG_PANEL_USE_VBIASEN	(1<<5)
+#define SM501FB_FLAG_PANEL_NO_FPEN	(1<<4)
+#define SM501FB_FLAG_PANEL_NO_VBIASEN	(1<<5)
 
 struct sm501_platdata_fbsub {
 	struct fb_videomode	*def_mode;

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-05-20 12:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 12:49 [patch 0/5] FB fixes for 2.6.26-rc series Ben Dooks
2008-05-20 12:49 ` Ben Dooks [this message]
2008-05-20 12:49 ` [patch 2/5] S3C2410: Ensure that FB_BLANK_POWERDOWN shuts down the controller Ben Dooks
2008-05-20 12:49 ` [patch 3/5] S3C2410: Add error print if we cannot add attribute Ben Dooks
2008-05-20 12:49 ` [patch 4/5] S3C2410: Clean out changelog header and tidy Ben Dooks
2008-05-20 12:49 ` [patch 5/5] S3C2410: Fix driver MODULE_ALIAS() Ben Dooks
2008-05-20 20:59 ` [patch 0/5] FB fixes for 2.6.26-rc series Krzysztof Helt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080520125029.967251370@fluff.org.uk \
    --to=ben-fbdev@fluff.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnaud.patard@rtp-net.org \
    --cc=ben-linux@fluff.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.