diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-02-06 04:39:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:16 -0500 |
commit | a9a84c37d1ee50db8f3752b117caf2b48dcd4f8a (patch) | |
tree | adac878234cbe372624c5d33e7d70322972392d7 /include | |
parent | b1230ee50a9903a987feaad767fb71e2fd173894 (diff) |
atmel_lcdfb: backlight control
On the sam9 EK boards, the LCD backlight is hooked up to a PWM output from
the LCD controller. It's controlled by "contrast" registers though.
This patch lets boards declare that they have that kind of backlight
control. The driver can then export this control, letting screenblank and
other operations actually take effect ... reducing the typically
substantial power drain from the backlight.
Note that it's not fully cooked
- doesn't force backlight off during system suspend
- the "power" and "blank" events may not be done right
This should be easily added in the future.
[nicolas.ferre@atmel.com: remove unneeded inline and rename functions]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/video/atmel_lcdc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 76095e70935b..336c20db87f8 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #ifndef __ATMEL_LCDC_H__ | 22 | #ifndef __ATMEL_LCDC_H__ |
23 | #define __ATMEL_LCDC_H__ | 23 | #define __ATMEL_LCDC_H__ |
24 | 24 | ||
25 | /* LCD Controller info data structure */ | 25 | /* LCD Controller info data structure, stored in device platform_data */ |
26 | struct atmel_lcdfb_info { | 26 | struct atmel_lcdfb_info { |
27 | spinlock_t lock; | 27 | spinlock_t lock; |
28 | struct fb_info *info; | 28 | struct fb_info *info; |
@@ -33,7 +33,14 @@ struct atmel_lcdfb_info { | |||
33 | struct platform_device *pdev; | 33 | struct platform_device *pdev; |
34 | struct clk *bus_clk; | 34 | struct clk *bus_clk; |
35 | struct clk *lcdc_clk; | 35 | struct clk *lcdc_clk; |
36 | unsigned int default_bpp; | 36 | |
37 | #ifdef CONFIG_BACKLIGHT_ATMEL_LCDC | ||
38 | struct backlight_device *backlight; | ||
39 | u8 bl_power; | ||
40 | #endif | ||
41 | bool lcdcon_is_backlight; | ||
42 | |||
43 | u8 default_bpp; | ||
37 | unsigned int default_lcdcon2; | 44 | unsigned int default_lcdcon2; |
38 | unsigned int default_dmacon; | 45 | unsigned int default_dmacon; |
39 | void (*atmel_lcdfb_power_control)(int on); | 46 | void (*atmel_lcdfb_power_control)(int on); |