summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorThomas Niederprüm <niederp@physik.uni-kl.de>2015-03-31 20:27:16 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-05-27 12:54:39 +0300
commit550e768c2a9932e037f2148ecddecd8a5ee0f26e (patch)
treeccbeed7669eb5a6fde7d568ef133aef46286dd42 /drivers/video/fbdev
parent6ed5e2db52b1e27a70241ef8749780f6f5d553bf (diff)
downloadop-kernel-dev-550e768c2a9932e037f2148ecddecd8a5ee0f26e.zip
op-kernel-dev-550e768c2a9932e037f2148ecddecd8a5ee0f26e.tar.gz
fbdev: ssd1307fb: Add blank mode
This patch adds ssd1307fb_blank() to make the framebuffer capable of blanking. Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/ssd1307fb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 77efed7..8fc224c 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -235,6 +235,16 @@ static ssize_t ssd1307fb_write(struct fb_info *info, const char __user *buf,
return count;
}
+static int ssd1307fb_blank(int blank_mode, struct fb_info *info)
+{
+ struct ssd1307fb_par *par = info->par;
+
+ if (blank_mode != FB_BLANK_UNBLANK)
+ return ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_OFF);
+ else
+ return ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
+}
+
static void ssd1307fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
struct ssd1307fb_par *par = info->par;
@@ -260,6 +270,7 @@ static struct fb_ops ssd1307fb_ops = {
.owner = THIS_MODULE,
.fb_read = fb_sys_read,
.fb_write = ssd1307fb_write,
+ .fb_blank = ssd1307fb_blank,
.fb_fillrect = ssd1307fb_fillrect,
.fb_copyarea = ssd1307fb_copyarea,
.fb_imageblit = ssd1307fb_imageblit,
OpenPOWER on IntegriCloud