diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 10:56:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 10:56:52 -0400 |
commit | 4cc4d24efce4672f9b0e7fa27963770ae602998f (patch) | |
tree | e69e7209db5500164eedb82c46ea657499b72287 /drivers/video/atmel_lcdfb.c | |
parent | b81a618dcd3ea99de292dbe624f41ca68f464376 (diff) | |
parent | 56be1416453c31d32f984328b5193489ab63ffcf (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (140 commits)
MAINTAINERS: de-orphan fbdev.
MAINTAINERS: Add file pattern for fb dt bindings.
video: Move sm501fb devicetree binding documentation to a better place.
fbcon: fix situation where fbcon gets deinitialised and can't reinit.
video, sm501: add OF binding to support SM501
video, sm501: add edid and commandline support
video, sm501: add I/O functions for use on powerpc
video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
fbcon: Bugfix soft cursor detection in Tile Blitting
video: add missing framebuffer_release in error path
video: metronomefb: add __devexit_p around reference to metronomefb_remove
video: hecubafb: add __devexit_p around reference to hecubafb_remove
drivers:video:aty:radeon_base Fix typo occationally to occasionally
atmel_lcdfb: add fb_blank function
atmel_lcdfb: implement inverted contrast pwm
video: s3c-fb: return proper error if clk_get fails
uvesafb,vesafb: create WC or WB PAT-entries
video: ffb: fix ffb_probe error path
radeonfb: Let hwmon driver probe the "monid" I2C bus
fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
...
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 4b4e8dadd6b2..ccecf9974587 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -68,7 +68,7 @@ static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, | |||
68 | } | 68 | } |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | static const u32 contrast_ctr = ATMEL_LCDC_PS_DIV8 | 71 | static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8 |
72 | | ATMEL_LCDC_POL_POSITIVE | 72 | | ATMEL_LCDC_POL_POSITIVE |
73 | | ATMEL_LCDC_ENA_PWMENABLE; | 73 | | ATMEL_LCDC_ENA_PWMENABLE; |
74 | 74 | ||
@@ -164,6 +164,10 @@ static void exit_backlight(struct atmel_lcdfb_info *sinfo) | |||
164 | 164 | ||
165 | static void init_contrast(struct atmel_lcdfb_info *sinfo) | 165 | static void init_contrast(struct atmel_lcdfb_info *sinfo) |
166 | { | 166 | { |
167 | /* contrast pwm can be 'inverted' */ | ||
168 | if (sinfo->lcdcon_pol_negative) | ||
169 | contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE); | ||
170 | |||
167 | /* have some default contrast/backlight settings */ | 171 | /* have some default contrast/backlight settings */ |
168 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr); | 172 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr); |
169 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, ATMEL_LCDC_CVAL_DEFAULT); | 173 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, ATMEL_LCDC_CVAL_DEFAULT); |
@@ -711,11 +715,35 @@ static int atmel_lcdfb_pan_display(struct fb_var_screeninfo *var, | |||
711 | return 0; | 715 | return 0; |
712 | } | 716 | } |
713 | 717 | ||
718 | static int atmel_lcdfb_blank(int blank_mode, struct fb_info *info) | ||
719 | { | ||
720 | struct atmel_lcdfb_info *sinfo = info->par; | ||
721 | |||
722 | switch (blank_mode) { | ||
723 | case FB_BLANK_UNBLANK: | ||
724 | case FB_BLANK_NORMAL: | ||
725 | atmel_lcdfb_start(sinfo); | ||
726 | break; | ||
727 | case FB_BLANK_VSYNC_SUSPEND: | ||
728 | case FB_BLANK_HSYNC_SUSPEND: | ||
729 | break; | ||
730 | case FB_BLANK_POWERDOWN: | ||
731 | atmel_lcdfb_stop(sinfo); | ||
732 | break; | ||
733 | default: | ||
734 | return -EINVAL; | ||
735 | } | ||
736 | |||
737 | /* let fbcon do a soft blank for us */ | ||
738 | return ((blank_mode == FB_BLANK_NORMAL) ? 1 : 0); | ||
739 | } | ||
740 | |||
714 | static struct fb_ops atmel_lcdfb_ops = { | 741 | static struct fb_ops atmel_lcdfb_ops = { |
715 | .owner = THIS_MODULE, | 742 | .owner = THIS_MODULE, |
716 | .fb_check_var = atmel_lcdfb_check_var, | 743 | .fb_check_var = atmel_lcdfb_check_var, |
717 | .fb_set_par = atmel_lcdfb_set_par, | 744 | .fb_set_par = atmel_lcdfb_set_par, |
718 | .fb_setcolreg = atmel_lcdfb_setcolreg, | 745 | .fb_setcolreg = atmel_lcdfb_setcolreg, |
746 | .fb_blank = atmel_lcdfb_blank, | ||
719 | .fb_pan_display = atmel_lcdfb_pan_display, | 747 | .fb_pan_display = atmel_lcdfb_pan_display, |
720 | .fb_fillrect = cfb_fillrect, | 748 | .fb_fillrect = cfb_fillrect, |
721 | .fb_copyarea = cfb_copyarea, | 749 | .fb_copyarea = cfb_copyarea, |
@@ -817,6 +845,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
817 | sinfo->guard_time = pdata_sinfo->guard_time; | 845 | sinfo->guard_time = pdata_sinfo->guard_time; |
818 | sinfo->smem_len = pdata_sinfo->smem_len; | 846 | sinfo->smem_len = pdata_sinfo->smem_len; |
819 | sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; | 847 | sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; |
848 | sinfo->lcdcon_pol_negative = pdata_sinfo->lcdcon_pol_negative; | ||
820 | sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; | 849 | sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; |
821 | } else { | 850 | } else { |
822 | dev_err(dev, "cannot get default configuration\n"); | 851 | dev_err(dev, "cannot get default configuration\n"); |