summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/lms501kf03.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-11-23 03:29:57 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-11-23 03:29:57 +0300
commit2fb7eb3d7e8c5c0375c726c7d5c443e6f7e53741 (patch)
treed6cf7e7bf329e8758ef9ede1a37dad55763a21d9 /drivers/video/backlight/lms501kf03.c
parent93251bdf7a771c4eeb0f95fa38ded92e95154ef7 (diff)
parent3adec6f907b698b32ab62f70da31b41abed00c59 (diff)
downloadlinux-2fb7eb3d7e8c5c0375c726c7d5c443e6f7e53741.tar.xz
Merge tag 'backlight-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: - Improve handling of LCD power states and interactions with the fbdev subsystem - Introduce new LCD_POWER_ constants to decouple the LCD subsystem from fbdev - Update several drivers to use the new LCD_POWER_ constants - Clarify the semantics of the lcd_ops.controls_device callback - Remove unnecessary includes and dependencies - Remove unused notifier functionality - Simplify code with scoped for-each loops - Fix module autoloading for the ktz8866 driver - Update device tree bindings to yaml format - Minor cleanups and improvements in various drivers * tag 'backlight-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (33 commits) MAINTAINERS: Use Daniel Thompson's korg address for Backlight work dt-bindings: backlight: Convert zii,rave-sp-backlight.txt to yaml backlight: Remove notifier backlight: ktz8866: Fix module autoloading backlight: 88pm860x_bl: Simplify with scoped for each OF child loop backlight: lcd: Do not include <linux/fb.h> in lcd header backlight: lcd: Remove struct fb_videomode from set_mode callback backlight: lcd: Replace check_fb with controls_device HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev fbdev: omap: Use lcd power constants fbdev: imxfb: Use lcd power constants fbdev: imxfb: Replace check_fb in favor of struct fb_info.lcd_dev fbdev: clps711x-fb: Use lcd power constants fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev backlight: tdo24m: Use lcd power constants backlight: platform_lcd: Use lcd power constants backlight: platform_lcd: Remove match_fb from struct plat_lcd_data backlight: platform_lcd: Remove include statement for <linux/backlight.h> backlight: otm3225a: Use lcd power constants backlight: ltv350qv: Use lcd power constants ...
Diffstat (limited to 'drivers/video/backlight/lms501kf03.c')
-rw-r--r--drivers/video/backlight/lms501kf03.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c
index 8aebe0af3391..28721b48b4c7 100644
--- a/drivers/video/backlight/lms501kf03.c
+++ b/drivers/video/backlight/lms501kf03.c
@@ -6,9 +6,7 @@
* Author: Jingoo Han <jg1.han@samsung.com>
*/
-#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>
@@ -206,7 +204,7 @@ static int lms501kf03_ldi_disable(struct lms501kf03 *lcd)
static int lms501kf03_power_is_on(int power)
{
- return (power) <= FB_BLANK_NORMAL;
+ return (power) <= LCD_POWER_REDUCED;
}
static int lms501kf03_power_on(struct lms501kf03 *lcd)
@@ -295,8 +293,8 @@ static int lms501kf03_set_power(struct lcd_device *ld, int power)
{
struct lms501kf03 *lcd = lcd_get_data(ld);
- if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
- power != FB_BLANK_NORMAL) {
+ if (power != LCD_POWER_ON && power != LCD_POWER_OFF &&
+ power != LCD_POWER_REDUCED) {
dev_err(lcd->dev, "power value should be 0, 1 or 4.\n");
return -EINVAL;
}
@@ -350,11 +348,11 @@ static int lms501kf03_probe(struct spi_device *spi)
* current lcd status is powerdown and then
* it enables lcd panel.
*/
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = LCD_POWER_OFF;
- lms501kf03_power(lcd, FB_BLANK_UNBLANK);
+ lms501kf03_power(lcd, LCD_POWER_ON);
} else {
- lcd->power = FB_BLANK_UNBLANK;
+ lcd->power = LCD_POWER_ON;
}
spi_set_drvdata(spi, lcd);
@@ -368,7 +366,7 @@ static void lms501kf03_remove(struct spi_device *spi)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
- lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ lms501kf03_power(lcd, LCD_POWER_OFF);
}
#ifdef CONFIG_PM_SLEEP
@@ -382,16 +380,16 @@ static int lms501kf03_suspend(struct device *dev)
* when lcd panel is suspend, lcd panel becomes off
* regardless of status.
*/
- return lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ return lms501kf03_power(lcd, LCD_POWER_OFF);
}
static int lms501kf03_resume(struct device *dev)
{
struct lms501kf03 *lcd = dev_get_drvdata(dev);
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = LCD_POWER_OFF;
- return lms501kf03_power(lcd, FB_BLANK_UNBLANK);
+ return lms501kf03_power(lcd, LCD_POWER_ON);
}
#endif
@@ -402,7 +400,7 @@ static void lms501kf03_shutdown(struct spi_device *spi)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
- lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ lms501kf03_power(lcd, LCD_POWER_OFF);
}
static struct spi_driver lms501kf03_driver = {