@@ -112,40 +112,40 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)
const u16 slpin = 0x10;
const u16 disoff = 0x28;
- if (power <= FB_BLANK_NORMAL) {
- if (priv->lcd_state <= FB_BLANK_NORMAL) {
+ if (power <= LCD_POWER_REDUCED) {
+ if (priv->lcd_state <= LCD_POWER_REDUCED) {
/* Do nothing, the LCD is running */
- } else if (priv->lcd_state < FB_BLANK_POWERDOWN) {
+ } else if (priv->lcd_state < LCD_POWER_OFF) {
dev_dbg(&spi->dev, "Resuming LCD\n");
spi_write(spi, (const u8 *)&slpout, sizeof(u16));
msleep(60);
spi_write(spi, (const u8 *)&dison, sizeof(u16));
} else {
- /* priv->lcd_state == FB_BLANK_POWERDOWN */
+ /* priv->lcd_state == LCD_POWER_OFF */
l4f00242t03_lcd_init(spi);
- priv->lcd_state = FB_BLANK_VSYNC_SUSPEND;
+ priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND;
l4f00242t03_lcd_power_set(priv->ld, power);
}
- } else if (power < FB_BLANK_POWERDOWN) {
- if (priv->lcd_state <= FB_BLANK_NORMAL) {
+ } else if (power < LCD_POWER_OFF) {
+ if (priv->lcd_state <= LCD_POWER_REDUCED) {
/* Send the display in standby */
dev_dbg(&spi->dev, "Standby the LCD\n");
spi_write(spi, (const u8 *)&disoff, sizeof(u16));
msleep(60);
spi_write(spi, (const u8 *)&slpin, sizeof(u16));
- } else if (priv->lcd_state < FB_BLANK_POWERDOWN) {
+ } else if (priv->lcd_state < LCD_POWER_OFF) {
/* Do nothing, the LCD is already in standby */
} else {
- /* priv->lcd_state == FB_BLANK_POWERDOWN */
+ /* priv->lcd_state == LCD_POWER_OFF */
l4f00242t03_lcd_init(spi);
- priv->lcd_state = FB_BLANK_UNBLANK;
+ priv->lcd_state = LCD_POWER_ON;
l4f00242t03_lcd_power_set(ld, power);
}
} else {
- /* power == FB_BLANK_POWERDOWN */
- if (priv->lcd_state != FB_BLANK_POWERDOWN) {
+ /* power == LCD_POWER_OFF */
+ if (priv->lcd_state != LCD_POWER_OFF) {
/* Clear the screen before shutting down */
spi_write(spi, (const u8 *)&disoff, sizeof(u16));
msleep(60);
@@ -209,8 +209,8 @@ static int l4f00242t03_probe(struct spi_device *spi)
/* Init the LCD */
l4f00242t03_lcd_init(spi);
- priv->lcd_state = FB_BLANK_VSYNC_SUSPEND;
- l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_UNBLANK);
+ priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND;
+ l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_ON);
dev_info(&spi->dev, "Epson l4f00242t03 lcd probed.\n");
@@ -221,7 +221,7 @@ static void l4f00242t03_remove(struct spi_device *spi)
{
struct l4f00242t03_priv *priv = spi_get_drvdata(spi);
- l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN);
+ l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF);
}
static void l4f00242t03_shutdown(struct spi_device *spi)
@@ -229,7 +229,7 @@ static void l4f00242t03_shutdown(struct spi_device *spi)
struct l4f00242t03_priv *priv = spi_get_drvdata(spi);
if (priv)
- l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN);
+ l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF);
}