summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2024-06-24 17:19:58 +0200
committerLee Jones <lee@kernel.org>2024-07-04 16:45:25 +0100
commit1adf98242e0ec33f15c4f7a1e86ad76abf209665 (patch)
treeed8d03437aa9a743021b3aa4b4bcbea55ca9f52b /drivers/video
parent26dcf62333f1c1ec33a469339a287ab8eecfb06e (diff)
backlight: ams369fb06: Use backlight power constants
Replace FB_BLANK_ constants with their counterparts from the backlight 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/20240624152033.25016-4-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/ams369fg06.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c
index 57ec205d2bd2..f8442689ac43 100644
--- a/drivers/video/backlight/ams369fg06.c
+++ b/drivers/video/backlight/ams369fg06.c
@@ -10,7 +10,6 @@
#include <linux/backlight.h>
#include <linux/delay.h>
-#include <linux/fb.h>
#include <linux/lcd.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
@@ -300,7 +299,7 @@ static int ams369fg06_ldi_disable(struct ams369fg06 *lcd)
static int ams369fg06_power_is_on(int power)
{
- return power <= FB_BLANK_NORMAL;
+ return power <= BACKLIGHT_POWER_REDUCED;
}
static int ams369fg06_power_on(struct ams369fg06 *lcd)
@@ -396,8 +395,8 @@ static int ams369fg06_set_power(struct lcd_device *ld, int power)
{
struct ams369fg06 *lcd = lcd_get_data(ld);
- if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
- power != FB_BLANK_NORMAL) {
+ if (power != BACKLIGHT_POWER_ON && power != BACKLIGHT_POWER_OFF &&
+ power != BACKLIGHT_POWER_REDUCED) {
dev_err(lcd->dev, "power value should be 0, 1 or 4.\n");
return -EINVAL;
}
@@ -492,11 +491,11 @@ static int ams369fg06_probe(struct spi_device *spi)
* current lcd status is powerdown and then
* it enables lcd panel.
*/
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = BACKLIGHT_POWER_OFF;
- ams369fg06_power(lcd, FB_BLANK_UNBLANK);
+ ams369fg06_power(lcd, BACKLIGHT_POWER_ON);
} else {
- lcd->power = FB_BLANK_UNBLANK;
+ lcd->power = BACKLIGHT_POWER_ON;
}
spi_set_drvdata(spi, lcd);
@@ -510,7 +509,7 @@ static void ams369fg06_remove(struct spi_device *spi)
{
struct ams369fg06 *lcd = spi_get_drvdata(spi);
- ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
+ ams369fg06_power(lcd, BACKLIGHT_POWER_OFF);
}
#ifdef CONFIG_PM_SLEEP
@@ -524,16 +523,16 @@ static int ams369fg06_suspend(struct device *dev)
* when lcd panel is suspend, lcd panel becomes off
* regardless of status.
*/
- return ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
+ return ams369fg06_power(lcd, BACKLIGHT_POWER_OFF);
}
static int ams369fg06_resume(struct device *dev)
{
struct ams369fg06 *lcd = dev_get_drvdata(dev);
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = BACKLIGHT_POWER_OFF;
- return ams369fg06_power(lcd, FB_BLANK_UNBLANK);
+ return ams369fg06_power(lcd, BACKLIGHT_POWER_ON);
}
#endif
@@ -544,7 +543,7 @@ static void ams369fg06_shutdown(struct spi_device *spi)
{
struct ams369fg06 *lcd = spi_get_drvdata(spi);
- ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
+ ams369fg06_power(lcd, BACKLIGHT_POWER_OFF);
}
static struct spi_driver ams369fg06_driver = {