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

backlight: ili9320: 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-8-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
e8444522 4364900b

+7 -8
+7 -8
drivers/video/backlight/ili9320.c
··· 10 10 11 11 #include <linux/delay.h> 12 12 #include <linux/err.h> 13 - #include <linux/fb.h> 14 13 #include <linux/init.h> 15 14 #include <linux/lcd.h> 16 15 #include <linux/module.h> ··· 120 121 return 0; 121 122 } 122 123 123 - #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) 124 + #define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) 124 125 125 126 static int ili9320_power(struct ili9320 *lcd, int power) 126 127 { ··· 222 223 223 224 ili->dev = dev; 224 225 ili->client = client; 225 - ili->power = FB_BLANK_POWERDOWN; 226 + ili->power = LCD_POWER_OFF; 226 227 ili->platdata = cfg; 227 228 228 229 spi_set_drvdata(spi, ili); ··· 240 241 241 242 dev_info(dev, "initialising %s\n", client->name); 242 243 243 - ret = ili9320_power(ili, FB_BLANK_UNBLANK); 244 + ret = ili9320_power(ili, LCD_POWER_ON); 244 245 if (ret != 0) { 245 246 dev_err(dev, "failed to set lcd power state\n"); 246 247 return ret; ··· 252 253 253 254 void ili9320_remove(struct ili9320 *ili) 254 255 { 255 - ili9320_power(ili, FB_BLANK_POWERDOWN); 256 + ili9320_power(ili, LCD_POWER_OFF); 256 257 } 257 258 EXPORT_SYMBOL_GPL(ili9320_remove); 258 259 ··· 261 262 { 262 263 int ret; 263 264 264 - ret = ili9320_power(lcd, FB_BLANK_POWERDOWN); 265 + ret = ili9320_power(lcd, LCD_POWER_OFF); 265 266 266 267 if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) { 267 268 ili9320_write(lcd, ILI9320_POWER1, lcd->power1 | ··· 281 282 if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) 282 283 ili9320_write(lcd, ILI9320_POWER1, 0x00); 283 284 284 - return ili9320_power(lcd, FB_BLANK_UNBLANK); 285 + return ili9320_power(lcd, LCD_POWER_ON); 285 286 } 286 287 EXPORT_SYMBOL_GPL(ili9320_resume); 287 288 #endif ··· 289 290 /* Power down all displays on reboot, poweroff or halt */ 290 291 void ili9320_shutdown(struct ili9320 *lcd) 291 292 { 292 - ili9320_power(lcd, FB_BLANK_POWERDOWN); 293 + ili9320_power(lcd, LCD_POWER_OFF); 293 294 } 294 295 EXPORT_SYMBOL_GPL(ili9320_shutdown); 295 296