Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: l4f00242t03: Use lcd power constants

Replace FB_BLANK_ constants with their counterparts from the
lcd subsystem. The values are identical, so there's no change
in functionality.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240906075439.98476-11-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
4be0de90 992f5c43

+16 -16
+16 -16
drivers/video/backlight/l4f00242t03.c
··· 112 112 const u16 slpin = 0x10; 113 113 const u16 disoff = 0x28; 114 114 115 - if (power <= FB_BLANK_NORMAL) { 116 - if (priv->lcd_state <= FB_BLANK_NORMAL) { 115 + if (power <= LCD_POWER_REDUCED) { 116 + if (priv->lcd_state <= LCD_POWER_REDUCED) { 117 117 /* Do nothing, the LCD is running */ 118 - } else if (priv->lcd_state < FB_BLANK_POWERDOWN) { 118 + } else if (priv->lcd_state < LCD_POWER_OFF) { 119 119 dev_dbg(&spi->dev, "Resuming LCD\n"); 120 120 121 121 spi_write(spi, (const u8 *)&slpout, sizeof(u16)); 122 122 msleep(60); 123 123 spi_write(spi, (const u8 *)&dison, sizeof(u16)); 124 124 } else { 125 - /* priv->lcd_state == FB_BLANK_POWERDOWN */ 125 + /* priv->lcd_state == LCD_POWER_OFF */ 126 126 l4f00242t03_lcd_init(spi); 127 - priv->lcd_state = FB_BLANK_VSYNC_SUSPEND; 127 + priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND; 128 128 l4f00242t03_lcd_power_set(priv->ld, power); 129 129 } 130 - } else if (power < FB_BLANK_POWERDOWN) { 131 - if (priv->lcd_state <= FB_BLANK_NORMAL) { 130 + } else if (power < LCD_POWER_OFF) { 131 + if (priv->lcd_state <= LCD_POWER_REDUCED) { 132 132 /* Send the display in standby */ 133 133 dev_dbg(&spi->dev, "Standby the LCD\n"); 134 134 135 135 spi_write(spi, (const u8 *)&disoff, sizeof(u16)); 136 136 msleep(60); 137 137 spi_write(spi, (const u8 *)&slpin, sizeof(u16)); 138 - } else if (priv->lcd_state < FB_BLANK_POWERDOWN) { 138 + } else if (priv->lcd_state < LCD_POWER_OFF) { 139 139 /* Do nothing, the LCD is already in standby */ 140 140 } else { 141 - /* priv->lcd_state == FB_BLANK_POWERDOWN */ 141 + /* priv->lcd_state == LCD_POWER_OFF */ 142 142 l4f00242t03_lcd_init(spi); 143 - priv->lcd_state = FB_BLANK_UNBLANK; 143 + priv->lcd_state = LCD_POWER_ON; 144 144 l4f00242t03_lcd_power_set(ld, power); 145 145 } 146 146 } else { 147 - /* power == FB_BLANK_POWERDOWN */ 148 - if (priv->lcd_state != FB_BLANK_POWERDOWN) { 147 + /* power == LCD_POWER_OFF */ 148 + if (priv->lcd_state != LCD_POWER_OFF) { 149 149 /* Clear the screen before shutting down */ 150 150 spi_write(spi, (const u8 *)&disoff, sizeof(u16)); 151 151 msleep(60); ··· 212 212 213 213 /* Init the LCD */ 214 214 l4f00242t03_lcd_init(spi); 215 - priv->lcd_state = FB_BLANK_VSYNC_SUSPEND; 216 - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_UNBLANK); 215 + priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND; 216 + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_ON); 217 217 218 218 dev_info(&spi->dev, "Epson l4f00242t03 lcd probed.\n"); 219 219 ··· 224 224 { 225 225 struct l4f00242t03_priv *priv = spi_get_drvdata(spi); 226 226 227 - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN); 227 + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF); 228 228 } 229 229 230 230 static void l4f00242t03_shutdown(struct spi_device *spi) ··· 232 232 struct l4f00242t03_priv *priv = spi_get_drvdata(spi); 233 233 234 234 if (priv) 235 - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN); 235 + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF); 236 236 237 237 } 238 238