summaryrefslogtreecommitdiffstats
path: root/drivers/video/atmel_lcdfb.c
diff options
context:
space:
mode:
authorAndreas Bießmann <biessmann@corscience.de>2011-02-11 15:19:44 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 16:23:47 +0900
commitbed7bddbb434df0e76ffe2ff8cb535fe8f3c0c69 (patch)
tree1634a267497d92d37b88ca9c6b889ae794c2a314 /drivers/video/atmel_lcdfb.c
parent7cdcdb69bdf51192bcbfb7cf479850fe7c33357d (diff)
downloadblackbird-op-linux-bed7bddbb434df0e76ffe2ff8cb535fe8f3c0c69.tar.gz
blackbird-op-linux-bed7bddbb434df0e76ffe2ff8cb535fe8f3c0c69.zip
atmel_lcdfb: add fb_blank function
Signed-off-by: Andreas Bießmann <biessmann@corscience.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r--drivers/video/atmel_lcdfb.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 16da8af7425c..59654e29e205 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,
OpenPOWER on IntegriCloud