.set_power gets passed an FB_BLANK_XXX value, not a bool. So 0 signals on; and >1 means off. The same applies for return values of .get_power. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- Changes since (implicit) v1, sent with Message-Id: 1457380425-20244-2-git-send-email-u.kleine-koenig@xxxxxxxxxxxxxx - Make it explicit that we're working on FB_BLANK_XXX values, suggested by Philipp Zabel. drivers/video/fbdev/imxfb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 76b6a7784b06..6d402c1a0f2b 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -758,10 +758,11 @@ static int imxfb_lcd_get_power(struct lcd_device *lcddev) { 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) @@ -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); if (!IS_ERR(fbi->lcd_pwr)) { - if (power) + if (power == FB_BLANK_UNBLANK) return regulator_enable(fbi->lcd_pwr); else return regulator_disable(fbi->lcd_pwr); -- 2.8.0.rc3 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html