LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Andreas Bießmann" <biessmann@corscience.de>
To: kernel@avr32linux.org
Cc: "Nicolas Ferre" <nicolas.ferre@atmel.com>,
	"Andreas Bießmann" <biessmann@corscience.de>,
	linux-fbdev@vger.kernel.org (open list:ATMEL LCDFB DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/2] atmel_lcdfb: add fb_blank function
Date: Fri, 11 Feb 2011 16:19:44 +0100	[thread overview]
Message-ID: <1297437584-14048-2-git-send-email-biessmann@corscience.de> (raw)
In-Reply-To: <1297437584-14048-1-git-send-email-biessmann@corscience.de>

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
These are some older patches which are used in some of our systems. Heavy
merging pointed out these functionality was missed to push upstream.

 drivers/video/atmel_lcdfb.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 16da8af..59654e2 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -714,11 +714,35 @@ static int atmel_lcdfb_pan_display(struct fb_var_screeninfo *var,
 	return 0;
 }
 
+static int atmel_lcdfb_blank(int blank_mode, struct fb_info *info)
+{
+	struct atmel_lcdfb_info *sinfo = info->par;
+
+	switch (blank_mode) {
+	case FB_BLANK_UNBLANK:
+	case FB_BLANK_NORMAL:
+		atmel_lcdfb_start(sinfo);
+		break;
+	case FB_BLANK_VSYNC_SUSPEND:
+	case FB_BLANK_HSYNC_SUSPEND:
+		break;
+	case FB_BLANK_POWERDOWN:
+		atmel_lcdfb_stop(sinfo);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	/* let fbcon do a soft blank for us */
+	return ((blank_mode == FB_BLANK_NORMAL) ? 1 : 0);
+}
+
 static struct fb_ops atmel_lcdfb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= atmel_lcdfb_check_var,
 	.fb_set_par	= atmel_lcdfb_set_par,
 	.fb_setcolreg	= atmel_lcdfb_setcolreg,
+	.fb_blank	= atmel_lcdfb_blank,
 	.fb_pan_display	= atmel_lcdfb_pan_display,
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
-- 
1.7.2.3


      reply	other threads:[~2011-02-11 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11 15:19 [PATCH 1/2] atmel_lcdfb: implement inverted contrast pwm Andreas Bießmann
2011-02-11 15:19 ` Andreas Bießmann [this message]

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=1297437584-14048-2-git-send-email-biessmann@corscience.de \
    --to=biessmann@corscience.de \
    --cc=kernel@avr32linux.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --subject='Re: [PATCH 2/2] atmel_lcdfb: add fb_blank function' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).