|
@@ -758,10 +758,11 @@ static int imxfb_lcd_get_power(struct lcd_device *lcddev)
|
|
{
|
|
{
|
|
struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev);
|
|
struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev);
|
|
|
|
|
|
- if (!IS_ERR(fbi->lcd_pwr))
|
|
|
|
- return regulator_is_enabled(fbi->lcd_pwr);
|
|
|
|
|
|
+ if (!IS_ERR(fbi->lcd_pwr) &&
|
|
|
|
+ !regulator_is_enabled(fbi->lcd_pwr))
|
|
|
|
+ return FB_BLANK_POWERDOWN;
|
|
|
|
|
|
- return 1;
|
|
|
|
|
|
+ return FB_BLANK_UNBLANK;
|
|
}
|
|
}
|
|
|
|
|
|
static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power)
|
|
static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power)
|
|
@@ -769,7 +770,7 @@ static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power)
|
|
struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev);
|
|
struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev);
|
|
|
|
|
|
if (!IS_ERR(fbi->lcd_pwr)) {
|
|
if (!IS_ERR(fbi->lcd_pwr)) {
|
|
- if (power)
|
|
|
|
|
|
+ if (power == FB_BLANK_UNBLANK)
|
|
return regulator_enable(fbi->lcd_pwr);
|
|
return regulator_enable(fbi->lcd_pwr);
|
|
else
|
|
else
|
|
return regulator_disable(fbi->lcd_pwr);
|
|
return regulator_disable(fbi->lcd_pwr);
|