diff options
Diffstat (limited to 'drivers/video/da8xx-fb.c')
-rw-r--r-- | drivers/video/da8xx-fb.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 36574bf61d06..369a5b3ac649 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -702,6 +702,35 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
702 | return 0; | 702 | return 0; |
703 | } | 703 | } |
704 | 704 | ||
705 | static int cfb_blank(int blank, struct fb_info *info) | ||
706 | { | ||
707 | struct da8xx_fb_par *par = info->par; | ||
708 | int ret = 0; | ||
709 | |||
710 | if (par->blank == blank) | ||
711 | return 0; | ||
712 | |||
713 | par->blank = blank; | ||
714 | switch (blank) { | ||
715 | case FB_BLANK_UNBLANK: | ||
716 | if (par->panel_power_ctrl) | ||
717 | par->panel_power_ctrl(1); | ||
718 | |||
719 | lcd_enable_raster(); | ||
720 | break; | ||
721 | case FB_BLANK_POWERDOWN: | ||
722 | if (par->panel_power_ctrl) | ||
723 | par->panel_power_ctrl(0); | ||
724 | |||
725 | lcd_disable_raster(); | ||
726 | break; | ||
727 | default: | ||
728 | ret = -EINVAL; | ||
729 | } | ||
730 | |||
731 | return ret; | ||
732 | } | ||
733 | |||
705 | static struct fb_ops da8xx_fb_ops = { | 734 | static struct fb_ops da8xx_fb_ops = { |
706 | .owner = THIS_MODULE, | 735 | .owner = THIS_MODULE, |
707 | .fb_check_var = fb_check_var, | 736 | .fb_check_var = fb_check_var, |
@@ -710,6 +739,7 @@ static struct fb_ops da8xx_fb_ops = { | |||
710 | .fb_fillrect = cfb_fillrect, | 739 | .fb_fillrect = cfb_fillrect, |
711 | .fb_copyarea = cfb_copyarea, | 740 | .fb_copyarea = cfb_copyarea, |
712 | .fb_imageblit = cfb_imageblit, | 741 | .fb_imageblit = cfb_imageblit, |
742 | .fb_blank = cfb_blank, | ||
713 | }; | 743 | }; |
714 | 744 | ||
715 | static int __init fb_probe(struct platform_device *device) | 745 | static int __init fb_probe(struct platform_device *device) |