summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2010-10-26 13:52:59 +0800
committerScott Sweeny <scott.sweeny@timesys.com>2011-01-19 11:50:14 -0500
commitc59f708acc36d947d9bab1f836860f3415a54365 (patch)
treeae66f83c5539223382c2e39f3ea82f55ec3820f9 /drivers
parentc394dc0fbfa5371ccb2411e36c09fa9b8448ad4b (diff)
ENGR00126874 backlight:Fix backlight value can't keep after suspend and resume.
Backlight value is reset at event MXS_LCDIF_PANEL_INIT after resume. Check suspend status to avoid reset value. Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/backlight/mxs_bl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/backlight/mxs_bl.c b/drivers/video/backlight/mxs_bl.c
index a66cbaae4c18..271fd2907f59 100644
--- a/drivers/video/backlight/mxs_bl.c
+++ b/drivers/video/backlight/mxs_bl.c
@@ -274,13 +274,15 @@ static int mxsbl_do_probe(struct mxs_bl_data *data,
data->bd->props.power = FB_BLANK_UNBLANK;
data->bd->props.fb_blank = FB_BLANK_UNBLANK;
- if (data->mxsbl_constrained) {
- data->bd->props.max_brightness = pdata->bl_cons_intensity;
- data->bd->props.brightness = pdata->bl_cons_intensity;
- } else {
- data->bd->props.max_brightness = pdata->bl_max_intensity;
- data->bd->props.brightness = pdata->bl_default_intensity;
- }
+
+ if (!data->mxsbl_suspended)
+ if (data->mxsbl_constrained) {
+ data->bd->props.max_brightness = pdata->bl_cons_intensity;
+ data->bd->props.brightness = pdata->bl_cons_intensity;
+ } else {
+ data->bd->props.max_brightness = pdata->bl_max_intensity;
+ data->bd->props.brightness = pdata->bl_default_intensity;
+ }
data->pdata = pdata;
mxsbl_set_intensity(data->bd);