* [PATCH v2 00/17] backlight: Introduce power-state constants
@ 2024-06-24 15:19 Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states Thomas Zimmermann
` (18 more replies)
0 siblings, 19 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:19 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
The backlight code currently uses fbdev's FB_BLANK_ constants to
represent power states UNBLANK and POWERDOWN. Introduce dedicated
backlight constants to remove this dependency on fbdev.
Patch 1 introduces BACKLIGHT_POWER_ON and BACKLIGHT_POWER_OFF, which
replace constants from fbdev. There's also BACKLIGHT_POWER_REDUCED,
which is required by a few drivers that appear to use incorrect or
uncommon blanking semantics.
The rest of the patchset converts backlight drivers. The new
constants' values are identical to the old ones, so the driver
conversion can be done one-by-one.
There are many more backlight drivers in other subsystems. These
can later be converted when the new constants have been merged.
Once merged, several include statements for <linux/fb.h> can be
removed (specifically under drivers/platform/x86/).
This patchset is part of a larger effort to implement the backlight
code without depending on fbdev and ultimatively remove fbdev
dependencies from the kernel.
v2:
- rename BL_CORE_ power constants to BACKLIGHT_POWER_ (Sam)
- fix documentation
Thomas Zimmermann (17):
backlight: Add BACKLIGHT_POWER_ constants for power states
backlight: aat2870-backlight: Use blacklight power constants
backlight: ams369fb06: Use backlight power constants
backlight: corgi-lcd: Use backlight power constants
backlight: gpio-backlight: Use backlight power constants
backlight: ipaq-micro-backlight: Use backlight power constants
backlight: journada_bl: Use backlight power constants
backlight: kb3886-bl: Use backlight power constants
backlight: ktd253-backlight: Use backlight power constants
backlight: led-backlight: Use backlight power constants
backlight: lm3533-backlight: Use backlight power constants
backlight: mp3309c: Use backlight power constants
backlight: pandora-backlight: Use backlight power constants
backlight: pcf50633-backlight: Use backlight power constants
backlight: pwm-backlight: Use backlight power constants
backlight: rave-sp-backlight: Use backlight power constants
backlight: sky81452-backlight: Use backlight power constants
.../ABI/stable/sysfs-class-backlight | 7 +++---
drivers/video/backlight/aat2870_bl.c | 4 ++--
drivers/video/backlight/ams369fg06.c | 23 +++++++++----------
drivers/video/backlight/corgi_lcd.c | 4 ++--
drivers/video/backlight/gpio_backlight.c | 9 ++++----
drivers/video/backlight/ipaq_micro_bl.c | 3 +--
drivers/video/backlight/jornada720_bl.c | 3 +--
drivers/video/backlight/kb3886_bl.c | 4 ++--
drivers/video/backlight/ktd253-backlight.c | 5 ++--
drivers/video/backlight/led_bl.c | 4 ++--
drivers/video/backlight/lm3533_bl.c | 3 +--
drivers/video/backlight/mp3309c.c | 4 ++--
drivers/video/backlight/pandora_bl.c | 3 +--
drivers/video/backlight/pcf50633-backlight.c | 5 ++--
drivers/video/backlight/pwm_bl.c | 4 ++--
drivers/video/backlight/rave-sp-backlight.c | 2 +-
drivers/video/backlight/sky81452-backlight.c | 2 +-
include/linux/backlight.h | 20 +++++++++-------
18 files changed, 53 insertions(+), 56 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
@ 2024-06-24 15:19 ` Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 02/17] backlight: aat2870-backlight: Use blacklight power constants Thomas Zimmermann
` (17 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:19 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
Duplicate FB_BLANK_ constants as BACKLIGHT_POWER__ constants in the
backlight header file. Allows backlight drivers to avoid including
the fbdev header file and removes a compile-time dependency between
the two subsystems.
The new BACKLIGHT_POWER_ constants have the same values as their
FB_BLANK_ counterparts. Hence UAPI and internal semantics do not
change. The backlight drivers can be converted one by one. Each
instance of FB_BLANK_UNBLANK becomes BACKLIGHT_POWER_ON, each of
FB_BLANK_POWERDOWN becomes BACKLIGHT_POWER_OFF, and FB_BLANK_NORMAL
becomes BACKLIGHT_POWER_REDUCED.
Backlight code or drivers do not use FB_BLANK_VSYNC_SUSPEND and
FB_BLANK_HSYNC_SUSPEND, so no new constants for these are being
added.
The semantics of FB_BLANK_NORMAL appear inconsistent. In fbdev,
NORMAL means display off with sync enabled. In backlight code,
this translates to turn the backlight off, but some drivers
interpret it as backlight on. So we keep the current code as is,
but mark BACKLIGHT_POWER_REDUCED as deprecated. Drivers should be
fixed and the constant removed. This affects ams369fg06 and a few
DRM panel drivers.
v2:
- rename BL_CORE_ power constants to BACKLIGHT_POWER_ (Sam)
- fix documentation
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
.../ABI/stable/sysfs-class-backlight | 7 ++++---
include/linux/backlight.h | 20 +++++++++++--------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
index 023fb52645f8..6102d6bebdf9 100644
--- a/Documentation/ABI/stable/sysfs-class-backlight
+++ b/Documentation/ABI/stable/sysfs-class-backlight
@@ -3,10 +3,11 @@ Date: April 2005
KernelVersion: 2.6.12
Contact: Richard Purdie <rpurdie@rpsys.net>
Description:
- Control BACKLIGHT power, values are FB_BLANK_* from fb.h
+ Control BACKLIGHT power, values are compatible with
+ FB_BLANK_* from fb.h
- - FB_BLANK_UNBLANK (0) : power on.
- - FB_BLANK_POWERDOWN (4) : power off
+ - 0 (FB_BLANK_UNBLANK) : power on.
+ - 4 (FB_BLANK_POWERDOWN) : power off
Users: HAL
What: /sys/class/backlight/<backlight>/brightness
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 19a1c0e22629..ea9c1bc8148e 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -209,15 +209,19 @@ struct backlight_properties {
* attribute: /sys/class/backlight/<backlight>/bl_power
* When the power property is updated update_status() is called.
*
- * The possible values are: (0: full on, 1 to 3: power saving
- * modes; 4: full off), see FB_BLANK_XXX.
+ * The possible values are: (0: full on, 4: full off), see
+ * BACKLIGHT_POWER constants.
*
- * When the backlight device is enabled @power is set
- * to FB_BLANK_UNBLANK. When the backlight device is disabled
- * @power is set to FB_BLANK_POWERDOWN.
+ * When the backlight device is enabled, @power is set to
+ * BACKLIGHT_POWER_ON. When the backlight device is disabled,
+ * @power is set to BACKLIGHT_POWER_OFF.
*/
int power;
+#define BACKLIGHT_POWER_ON (0)
+#define BACKLIGHT_POWER_OFF (4)
+#define BACKLIGHT_POWER_REDUCED (1) // deprecated; don't use in new code
+
/**
* @type: The type of backlight supported.
*
@@ -346,7 +350,7 @@ static inline int backlight_enable(struct backlight_device *bd)
if (!bd)
return 0;
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
bd->props.state &= ~BL_CORE_FBBLANK;
return backlight_update_status(bd);
@@ -361,7 +365,7 @@ static inline int backlight_disable(struct backlight_device *bd)
if (!bd)
return 0;
- bd->props.power = FB_BLANK_POWERDOWN;
+ bd->props.power = BACKLIGHT_POWER_OFF;
bd->props.state |= BL_CORE_FBBLANK;
return backlight_update_status(bd);
@@ -380,7 +384,7 @@ static inline int backlight_disable(struct backlight_device *bd)
*/
static inline bool backlight_is_blank(const struct backlight_device *bd)
{
- return bd->props.power != FB_BLANK_UNBLANK ||
+ return bd->props.power != BACKLIGHT_POWER_ON ||
bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 02/17] backlight: aat2870-backlight: Use blacklight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states Thomas Zimmermann
@ 2024-06-24 15:19 ` Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 03/17] backlight: ams369fb06: Use backlight " Thomas Zimmermann
` (16 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:19 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/aat2870_bl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c
index b4c3354a1a8a..68d327ee4b2e 100644
--- a/drivers/video/backlight/aat2870_bl.c
+++ b/drivers/video/backlight/aat2870_bl.c
@@ -156,7 +156,7 @@ static int aat2870_bl_probe(struct platform_device *pdev)
bd->props.max_brightness = 255;
aat2870_bl->brightness = 0;
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
bd->props.brightness = bd->props.max_brightness;
ret = aat2870_bl_update_status(bd);
@@ -176,7 +176,7 @@ static void aat2870_bl_remove(struct platform_device *pdev)
struct aat2870_bl_driver_data *aat2870_bl = platform_get_drvdata(pdev);
struct backlight_device *bd = aat2870_bl->bd;
- bd->props.power = FB_BLANK_POWERDOWN;
+ bd->props.power = BACKLIGHT_POWER_OFF;
bd->props.brightness = 0;
backlight_update_status(bd);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 03/17] backlight: ams369fb06: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 02/17] backlight: aat2870-backlight: Use blacklight power constants Thomas Zimmermann
@ 2024-06-24 15:19 ` Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 04/17] backlight: corgi-lcd: " Thomas Zimmermann
` (15 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:19 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/ams369fg06.c | 23 +++++++++++------------
1 file 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 = {
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 04/17] backlight: corgi-lcd: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (2 preceding siblings ...)
2024-06-24 15:19 ` [PATCH v2 03/17] backlight: ams369fb06: Use backlight " Thomas Zimmermann
@ 2024-06-24 15:19 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 05/17] backlight: gpio-backlight: " Thomas Zimmermann
` (14 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:19 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality.
Only change the driver's backlight device, but leave the LCD
device as-is.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/backlight/corgi_lcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
index aad1680c9075..e4fcfbe38dc6 100644
--- a/drivers/video/backlight/corgi_lcd.c
+++ b/drivers/video/backlight/corgi_lcd.c
@@ -526,7 +526,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
return PTR_ERR(lcd->bl_dev);
lcd->bl_dev->props.brightness = pdata->default_intensity;
- lcd->bl_dev->props.power = FB_BLANK_UNBLANK;
+ lcd->bl_dev->props.power = BACKLIGHT_POWER_ON;
ret = setup_gpio_backlight(lcd, pdata);
if (ret)
@@ -547,7 +547,7 @@ static void corgi_lcd_remove(struct spi_device *spi)
{
struct corgi_lcd *lcd = spi_get_drvdata(spi);
- lcd->bl_dev->props.power = FB_BLANK_UNBLANK;
+ lcd->bl_dev->props.power = BACKLIGHT_POWER_ON;
lcd->bl_dev->props.brightness = 0;
backlight_update_status(lcd->bl_dev);
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 05/17] backlight: gpio-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (3 preceding siblings ...)
2024-06-24 15:19 ` [PATCH v2 04/17] backlight: corgi-lcd: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-26 11:52 ` Linus Walleij
2024-06-24 15:20 ` [PATCH v2 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
` (13 subsequent siblings)
18 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/gpio_backlight.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c
index 4476c317ce29..728a546904b0 100644
--- a/drivers/video/backlight/gpio_backlight.c
+++ b/drivers/video/backlight/gpio_backlight.c
@@ -5,7 +5,6 @@
#include <linux/backlight.h>
#include <linux/err.h>
-#include <linux/fb.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -81,12 +80,12 @@ static int gpio_backlight_probe(struct platform_device *pdev)
/* Set the initial power state */
if (!of_node || !of_node->phandle)
/* Not booted with device tree or no phandle link to the node */
- bl->props.power = def_value ? FB_BLANK_UNBLANK
- : FB_BLANK_POWERDOWN;
+ bl->props.power = def_value ? BACKLIGHT_POWER_ON
+ : BACKLIGHT_POWER_OFF;
else if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
- bl->props.power = FB_BLANK_POWERDOWN;
+ bl->props.power = BACKLIGHT_POWER_OFF;
else
- bl->props.power = FB_BLANK_UNBLANK;
+ bl->props.power = BACKLIGHT_POWER_ON;
bl->props.brightness = 1;
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 06/17] backlight: ipaq-micro-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (4 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 05/17] backlight: gpio-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-26 11:51 ` Linus Walleij
2024-06-24 15:20 ` [PATCH v2 07/17] backlight: journada_bl: " Thomas Zimmermann
` (12 subsequent siblings)
18 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/ipaq_micro_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/ipaq_micro_bl.c b/drivers/video/backlight/ipaq_micro_bl.c
index f595b8c8cbb2..19ff66e444bc 100644
--- a/drivers/video/backlight/ipaq_micro_bl.c
+++ b/drivers/video/backlight/ipaq_micro_bl.c
@@ -7,7 +7,6 @@
#include <linux/backlight.h>
#include <linux/err.h>
-#include <linux/fb.h>
#include <linux/init.h>
#include <linux/mfd/ipaq-micro.h>
#include <linux/module.h>
@@ -42,7 +41,7 @@ static const struct backlight_ops micro_bl_ops = {
static const struct backlight_properties micro_bl_props = {
.type = BACKLIGHT_RAW,
.max_brightness = 255,
- .power = FB_BLANK_UNBLANK,
+ .power = BACKLIGHT_POWER_ON,
.brightness = 64,
};
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 07/17] backlight: journada_bl: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (5 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 08/17] backlight: kb3886-bl: " Thomas Zimmermann
` (11 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/jornada720_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index 066d0dc98f60..e28d2c071798 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -7,7 +7,6 @@
#include <linux/backlight.h>
#include <linux/device.h>
-#include <linux/fb.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -121,7 +120,7 @@ static int jornada_bl_probe(struct platform_device *pdev)
return ret;
}
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
bd->props.brightness = BL_DEF_BRIGHT;
/*
* note. make sure max brightness is set otherwise
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 08/17] backlight: kb3886-bl: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (6 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 07/17] backlight: journada_bl: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 09/17] backlight: ktd253-backlight: " Thomas Zimmermann
` (10 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/kb3886_bl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c
index 55794b239cff..050b5c21f4a8 100644
--- a/drivers/video/backlight/kb3886_bl.c
+++ b/drivers/video/backlight/kb3886_bl.c
@@ -10,9 +10,9 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
-#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/dmi.h>
@@ -151,7 +151,7 @@ static int kb3886bl_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, kb3886_backlight_device);
- kb3886_backlight_device->props.power = FB_BLANK_UNBLANK;
+ kb3886_backlight_device->props.power = BACKLIGHT_POWER_ON;
kb3886_backlight_device->props.brightness = machinfo->default_intensity;
backlight_update_status(kb3886_backlight_device);
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 09/17] backlight: ktd253-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (7 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 08/17] backlight: kb3886-bl: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 10/17] backlight: led-backlight: " Thomas Zimmermann
` (9 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/ktd253-backlight.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/backlight/ktd253-backlight.c b/drivers/video/backlight/ktd253-backlight.c
index d7d43454f64a..327b4ee75254 100644
--- a/drivers/video/backlight/ktd253-backlight.c
+++ b/drivers/video/backlight/ktd253-backlight.c
@@ -7,7 +7,6 @@
#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/err.h>
-#include <linux/fb.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -190,10 +189,10 @@ static int ktd253_backlight_probe(struct platform_device *pdev)
/* When we just enable the GPIO line we set max brightness */
if (brightness) {
bl->props.brightness = brightness;
- bl->props.power = FB_BLANK_UNBLANK;
+ bl->props.power = BACKLIGHT_POWER_ON;
} else {
bl->props.brightness = 0;
- bl->props.power = FB_BLANK_POWERDOWN;
+ bl->props.power = BACKLIGHT_POWER_OFF;
}
ktd253->bl = bl;
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 10/17] backlight: led-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (8 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 09/17] backlight: ktd253-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 11/17] backlight: lm3533-backlight: " Thomas Zimmermann
` (8 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/led_bl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index 032f8bddf872..c7aefcd6e4e3 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -200,8 +200,8 @@ static int led_bl_probe(struct platform_device *pdev)
props.type = BACKLIGHT_RAW;
props.max_brightness = priv->max_brightness;
props.brightness = priv->default_brightness;
- props.power = (priv->default_brightness > 0) ? FB_BLANK_POWERDOWN :
- FB_BLANK_UNBLANK;
+ props.power = (priv->default_brightness > 0) ? BACKLIGHT_POWER_OFF :
+ BACKLIGHT_POWER_ON;
priv->bl_dev = backlight_device_register(dev_name(&pdev->dev),
&pdev->dev, priv, &led_bl_ops, &props);
if (IS_ERR(priv->bl_dev)) {
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 11/17] backlight: lm3533-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (9 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 10/17] backlight: led-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 12/17] backlight: mp3309c: " Thomas Zimmermann
` (7 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/lm3533_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/lm3533_bl.c b/drivers/video/backlight/lm3533_bl.c
index 3e10d480cb7f..5d06f8ca976c 100644
--- a/drivers/video/backlight/lm3533_bl.c
+++ b/drivers/video/backlight/lm3533_bl.c
@@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/slab.h>
#include <linux/mfd/lm3533.h>
@@ -344,7 +343,7 @@ static void lm3533_bl_remove(struct platform_device *pdev)
dev_dbg(&bd->dev, "%s\n", __func__);
- bd->props.power = FB_BLANK_POWERDOWN;
+ bd->props.power = BACKLIGHT_POWER_OFF;
bd->props.brightness = 0;
lm3533_ctrlbank_disable(&bl->cb);
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 12/17] backlight: mp3309c: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (10 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 11/17] backlight: lm3533-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 13/17] backlight: pandora-backlight: " Thomas Zimmermann
` (6 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/mp3309c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
index a28036c964af..88bc296968e9 100644
--- a/drivers/video/backlight/mp3309c.c
+++ b/drivers/video/backlight/mp3309c.c
@@ -358,7 +358,7 @@ static int mp3309c_probe(struct i2c_client *client)
props.max_brightness = pdata->max_brightness;
props.scale = BACKLIGHT_SCALE_LINEAR;
props.type = BACKLIGHT_RAW;
- props.power = FB_BLANK_UNBLANK;
+ props.power = BACKLIGHT_POWER_ON;
chip->bl = devm_backlight_device_register(dev, "mp3309c", dev, chip,
&mp3309c_bl_ops, &props);
if (IS_ERR(chip->bl))
@@ -388,7 +388,7 @@ static void mp3309c_remove(struct i2c_client *client)
struct mp3309c_chip *chip = i2c_get_clientdata(client);
struct backlight_device *bl = chip->bl;
- bl->props.power = FB_BLANK_POWERDOWN;
+ bl->props.power = BACKLIGHT_POWER_OFF;
bl->props.brightness = 0;
backlight_update_status(chip->bl);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 13/17] backlight: pandora-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (11 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 12/17] backlight: mp3309c: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 14/17] backlight: pcf50633-backlight: " Thomas Zimmermann
` (5 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/pandora_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c
index 51faa889e01f..8a63ded0fa90 100644
--- a/drivers/video/backlight/pandora_bl.c
+++ b/drivers/video/backlight/pandora_bl.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
-#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/mfd/twl.h>
#include <linux/err.h>
@@ -43,7 +42,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl)
struct pandora_private *priv = bl_get_data(bl);
u8 r;
- if (bl->props.power != FB_BLANK_UNBLANK)
+ if (bl->props.power != BACKLIGHT_POWER_ON)
brightness = 0;
if (bl->props.state & BL_CORE_FBBLANK)
brightness = 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 14/17] backlight: pcf50633-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (12 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 13/17] backlight: pandora-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 15/17] backlight: pwm-backlight: " Thomas Zimmermann
` (4 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/pcf50633-backlight.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
index 540dd3380c81..157be2f366df 100644
--- a/drivers/video/backlight/pcf50633-backlight.c
+++ b/drivers/video/backlight/pcf50633-backlight.c
@@ -10,7 +10,6 @@
#include <linux/platform_device.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/backlight.h>
@@ -53,7 +52,7 @@ static int pcf50633_bl_update_status(struct backlight_device *bl)
if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK) ||
- bl->props.power != FB_BLANK_UNBLANK)
+ bl->props.power != BACKLIGHT_POWER_ON)
new_brightness = 0;
else if (bl->props.brightness < pcf_bl->brightness_limit)
new_brightness = bl->props.brightness;
@@ -106,7 +105,7 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
memset(&bl_props, 0, sizeof(bl_props));
bl_props.type = BACKLIGHT_RAW;
bl_props.max_brightness = 0x3f;
- bl_props.power = FB_BLANK_UNBLANK;
+ bl_props.power = BACKLIGHT_POWER_ON;
if (pdata) {
bl_props.brightness = pdata->default_brightness;
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 15/17] backlight: pwm-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (13 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 14/17] backlight: pcf50633-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 16/17] backlight: rave-sp-backlight: " Thomas Zimmermann
` (3 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/pwm_bl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 61d30bc98eea..e942908d1275 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -426,7 +426,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
/* Not booted with device tree or no phandle link to the node */
if (!node || !node->phandle)
- return FB_BLANK_UNBLANK;
+ return BACKLIGHT_POWER_ON;
/*
* If the driver is probed from the device tree and there is a
@@ -434,7 +434,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
* assume that another driver will enable the backlight at the
* appropriate time. Therefore, if it is disabled, keep it so.
*/
- return active ? FB_BLANK_UNBLANK: FB_BLANK_POWERDOWN;
+ return active ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
}
static int pwm_backlight_probe(struct platform_device *pdev)
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 16/17] backlight: rave-sp-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (14 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 15/17] backlight: pwm-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 17/17] backlight: sky81452-backlight: " Thomas Zimmermann
` (2 subsequent siblings)
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/rave-sp-backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
index 05b5f003a3d1..e708a060a6e4 100644
--- a/drivers/video/backlight/rave-sp-backlight.c
+++ b/drivers/video/backlight/rave-sp-backlight.c
@@ -19,7 +19,7 @@ static int rave_sp_backlight_update_status(struct backlight_device *bd)
{
const struct backlight_properties *p = &bd->props;
const u8 intensity =
- (p->power == FB_BLANK_UNBLANK) ? p->brightness : 0;
+ (p->power == BACKLIGHT_POWER_ON) ? p->brightness : 0;
struct rave_sp *sp = dev_get_drvdata(&bd->dev);
u8 cmd[] = {
[0] = RAVE_SP_CMD_SET_BACKLIGHT,
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 17/17] backlight: sky81452-backlight: Use backlight power constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (15 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 16/17] backlight: rave-sp-backlight: " Thomas Zimmermann
@ 2024-06-24 15:20 ` Thomas Zimmermann
2024-07-01 11:07 ` [PATCH v2 00/17] backlight: Introduce power-state constants Daniel Thompson
2024-07-04 15:45 ` Lee Jones
18 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2024-06-24 15:20 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
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>
---
drivers/video/backlight/sky81452-backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
index 19f9f84a9fd6..935043b67786 100644
--- a/drivers/video/backlight/sky81452-backlight.c
+++ b/drivers/video/backlight/sky81452-backlight.c
@@ -315,7 +315,7 @@ static void sky81452_bl_remove(struct platform_device *pdev)
sysfs_remove_group(&bd->dev.kobj, &sky81452_bl_attr_group);
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
bd->props.brightness = 0;
backlight_update_status(bd);
--
2.45.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v2 06/17] backlight: ipaq-micro-backlight: Use backlight power constants
2024-06-24 15:20 ` [PATCH v2 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
@ 2024-06-26 11:51 ` Linus Walleij
0 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2024-06-26 11:51 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, daniel.thompson, sam, jingoohan1, deller, f.suligoi,
ukleinek, dri-devel, linux-fbdev, linux-pwm
On Mon, Jun 24, 2024 at 5:20 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> 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: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 05/17] backlight: gpio-backlight: Use backlight power constants
2024-06-24 15:20 ` [PATCH v2 05/17] backlight: gpio-backlight: " Thomas Zimmermann
@ 2024-06-26 11:52 ` Linus Walleij
0 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2024-06-26 11:52 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, daniel.thompson, sam, jingoohan1, deller, f.suligoi,
ukleinek, dri-devel, linux-fbdev, linux-pwm
On Mon, Jun 24, 2024 at 5:20 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> 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: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 00/17] backlight: Introduce power-state constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (16 preceding siblings ...)
2024-06-24 15:20 ` [PATCH v2 17/17] backlight: sky81452-backlight: " Thomas Zimmermann
@ 2024-07-01 11:07 ` Daniel Thompson
2024-07-04 15:45 ` Lee Jones
18 siblings, 0 replies; 22+ messages in thread
From: Daniel Thompson @ 2024-07-01 11:07 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, sam, jingoohan1, deller, linus.walleij, f.suligoi, ukleinek,
dri-devel, linux-fbdev, linux-pwm
On Mon, Jun 24, 2024 at 05:19:55PM +0200, Thomas Zimmermann wrote:
> The backlight code currently uses fbdev's FB_BLANK_ constants to
> represent power states UNBLANK and POWERDOWN. Introduce dedicated
> backlight constants to remove this dependency on fbdev.
>
> Patch 1 introduces BACKLIGHT_POWER_ON and BACKLIGHT_POWER_OFF, which
> replace constants from fbdev. There's also BACKLIGHT_POWER_REDUCED,
> which is required by a few drivers that appear to use incorrect or
> uncommon blanking semantics.
>
> The rest of the patchset converts backlight drivers. The new
> constants' values are identical to the old ones, so the driver
> conversion can be done one-by-one.
>
> There are many more backlight drivers in other subsystems. These
> can later be converted when the new constants have been merged.
> Once merged, several include statements for <linux/fb.h> can be
> removed (specifically under drivers/platform/x86/).
>
> This patchset is part of a larger effort to implement the backlight
> code without depending on fbdev and ultimatively remove fbdev
> dependencies from the kernel.
>
> v2:
> - rename BL_CORE_ power constants to BACKLIGHT_POWER_ (Sam)
> - fix documentation
>
> Thomas Zimmermann (17):
> backlight: Add BACKLIGHT_POWER_ constants for power states
> backlight: aat2870-backlight: Use blacklight power constants
> backlight: ams369fb06: Use backlight power constants
> backlight: corgi-lcd: Use backlight power constants
> backlight: gpio-backlight: Use backlight power constants
> backlight: ipaq-micro-backlight: Use backlight power constants
> backlight: journada_bl: Use backlight power constants
> backlight: kb3886-bl: Use backlight power constants
> backlight: ktd253-backlight: Use backlight power constants
> backlight: led-backlight: Use backlight power constants
> backlight: lm3533-backlight: Use backlight power constants
> backlight: mp3309c: Use backlight power constants
> backlight: pandora-backlight: Use backlight power constants
> backlight: pcf50633-backlight: Use backlight power constants
> backlight: pwm-backlight: Use backlight power constants
> backlight: rave-sp-backlight: Use backlight power constants
> backlight: sky81452-backlight: Use backlight power constants
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Daniel.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 00/17] backlight: Introduce power-state constants
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (17 preceding siblings ...)
2024-07-01 11:07 ` [PATCH v2 00/17] backlight: Introduce power-state constants Daniel Thompson
@ 2024-07-04 15:45 ` Lee Jones
18 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2024-07-04 15:45 UTC (permalink / raw)
To: lee, daniel.thompson, sam, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek, Thomas Zimmermann
Cc: dri-devel, linux-fbdev, linux-pwm
On Mon, 24 Jun 2024 17:19:55 +0200, Thomas Zimmermann wrote:
> The backlight code currently uses fbdev's FB_BLANK_ constants to
> represent power states UNBLANK and POWERDOWN. Introduce dedicated
> backlight constants to remove this dependency on fbdev.
>
> Patch 1 introduces BACKLIGHT_POWER_ON and BACKLIGHT_POWER_OFF, which
> replace constants from fbdev. There's also BACKLIGHT_POWER_REDUCED,
> which is required by a few drivers that appear to use incorrect or
> uncommon blanking semantics.
>
> [...]
Applied, thanks!
[01/17] backlight: Add BACKLIGHT_POWER_ constants for power states
commit: a1cacb8a8e70c38ec0c78910c668abda99fcb780
[02/17] backlight: aat2870-backlight: Use blacklight power constants
commit: 26dcf62333f1c1ec33a469339a287ab8eecfb06e
[03/17] backlight: ams369fb06: Use backlight power constants
commit: 1adf98242e0ec33f15c4f7a1e86ad76abf209665
[04/17] backlight: corgi-lcd: Use backlight power constants
commit: e263c051910190feba884179aef15e548273a7aa
[05/17] backlight: gpio-backlight: Use backlight power constants
commit: ef51815c5f970b228a775ceb3bb06ce46fe9ff86
[06/17] backlight: ipaq-micro-backlight: Use backlight power constants
commit: b6675c59473a26dec33281e4e872cf09f6321523
[07/17] backlight: journada_bl: Use backlight power constants
commit: 6910d19bb861db0721a171f4e351c290a40f1d19
[08/17] backlight: kb3886-bl: Use backlight power constants
commit: cebc25971f7f988dfd4d6c7269deea4c1ca5898e
[09/17] backlight: ktd253-backlight: Use backlight power constants
commit: def5831f09db8937218be50fc652d20c0a68e417
[10/17] backlight: led-backlight: Use backlight power constants
commit: 814d3e820039348f1467ada9a8a812c0b80733de
[11/17] backlight: lm3533-backlight: Use backlight power constants
commit: 761c83910b3d10e731b03438b883d271c295a9a5
[12/17] backlight: mp3309c: Use backlight power constants
commit: c2d9c4934bf4e12b531312bbf02a8543f6a23aae
[13/17] backlight: pandora-backlight: Use backlight power constants
commit: d4db2f193490415386ee13f714a0940943cbb149
[14/17] backlight: pcf50633-backlight: Use backlight power constants
commit: eca6b3ddfc554a9a51795cf035ccd60f2d842074
[15/17] backlight: pwm-backlight: Use backlight power constants
commit: eb1c4b6ddde6867498ead8d4b92d6abb5f736a7d
[16/17] backlight: rave-sp-backlight: Use backlight power constants
commit: 22f8a85ef0c563ba7e53d9ece39c1f2dc99f53ed
[17/17] backlight: sky81452-backlight: Use backlight power constants
commit: 1df5aa3754cac2045998ca505edb84d994786c67
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-07-04 15:46 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 15:19 [PATCH v2 00/17] backlight: Introduce power-state constants Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 02/17] backlight: aat2870-backlight: Use blacklight power constants Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 03/17] backlight: ams369fb06: Use backlight " Thomas Zimmermann
2024-06-24 15:19 ` [PATCH v2 04/17] backlight: corgi-lcd: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 05/17] backlight: gpio-backlight: " Thomas Zimmermann
2024-06-26 11:52 ` Linus Walleij
2024-06-24 15:20 ` [PATCH v2 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
2024-06-26 11:51 ` Linus Walleij
2024-06-24 15:20 ` [PATCH v2 07/17] backlight: journada_bl: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 08/17] backlight: kb3886-bl: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 09/17] backlight: ktd253-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 10/17] backlight: led-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 11/17] backlight: lm3533-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 12/17] backlight: mp3309c: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 13/17] backlight: pandora-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 14/17] backlight: pcf50633-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 15/17] backlight: pwm-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 16/17] backlight: rave-sp-backlight: " Thomas Zimmermann
2024-06-24 15:20 ` [PATCH v2 17/17] backlight: sky81452-backlight: " Thomas Zimmermann
2024-07-01 11:07 ` [PATCH v2 00/17] backlight: Introduce power-state constants Daniel Thompson
2024-07-04 15:45 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).