* [PATCH 01/17] backlight: Add BL_CORE_ constants for power states
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
@ 2024-06-11 12:41 ` Thomas Zimmermann
2024-06-11 17:55 ` Sam Ravnborg
2024-06-11 12:41 ` [PATCH 02/17] backlight: aat2870-backlight: Use blacklight power constants Thomas Zimmermann
` (15 subsequent siblings)
16 siblings, 1 reply; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:41 UTC (permalink / raw)
To: lee, daniel.thompson, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek
Cc: dri-devel, linux-fbdev, linux-pwm, Thomas Zimmermann
Duplicate FB_BLANK_ constants as BL_CORE_ 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 BL_CORE 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.
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 BL_CORE_NORMAL as deprecated. Drivers should be fixed
and the constant removed. This affects ams369fg06 and a few DRM
panel drivers.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
Documentation/ABI/stable/sysfs-class-backlight | 7 ++++---
include/linux/backlight.h | 16 ++++++++++------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
index 023fb52645f8b..6102d6bebdf9a 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 19a1c0e22629d..e0cfd89ffadd2 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -210,14 +210,18 @@ struct backlight_properties {
* 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.
+ * modes; 4: full off), see BL_CORE_XXX 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.
+ * to BL_CORE_UNBLANK. When the backlight device is disabled
+ * @power is set to BL_CORE_POWERDOWN.
*/
int power;
+#define BL_CORE_UNBLANK (0)
+#define BL_CORE_NORMAL (1) // deprecated; don't use in new code
+#define BL_CORE_POWERDOWN (4)
+
/**
* @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 = BL_CORE_UNBLANK;
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 = BL_CORE_POWERDOWN;
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 != BL_CORE_UNBLANK ||
bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH 01/17] backlight: Add BL_CORE_ constants for power states
2024-06-11 12:41 ` [PATCH 01/17] backlight: Add BL_CORE_ constants for power states Thomas Zimmermann
@ 2024-06-11 17:55 ` Sam Ravnborg
2024-06-12 7:26 ` Thomas Zimmermann
0 siblings, 1 reply; 21+ messages in thread
From: Sam Ravnborg @ 2024-06-11 17:55 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, daniel.thompson, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek, dri-devel, linux-fbdev, linux-pwm
Hi Thomas.
On Tue, Jun 11, 2024 at 02:41:56PM +0200, Thomas Zimmermann wrote:
> Duplicate FB_BLANK_ constants as BL_CORE_ 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.
Good to remove this dependency.
>
> The new BL_CORE 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.
This seems like the right approach.
>
> 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 BL_CORE_NORMAL as deprecated. Drivers should be fixed
> and the constant removed. This affects ams369fg06 and a few DRM
> panel drivers.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> Documentation/ABI/stable/sysfs-class-backlight | 7 ++++---
> include/linux/backlight.h | 16 ++++++++++------
> 2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
> index 023fb52645f8b..6102d6bebdf9a 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 19a1c0e22629d..e0cfd89ffadd2 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -210,14 +210,18 @@ struct backlight_properties {
> * 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.
> + * modes; 4: full off), see BL_CORE_XXX 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.
> + * to BL_CORE_UNBLANK. When the backlight device is disabled
> + * @power is set to BL_CORE_POWERDOWN.
> */
> int power;
>
> +#define BL_CORE_UNBLANK (0)
> +#define BL_CORE_NORMAL (1) // deprecated; don't use in new code
> +#define BL_CORE_POWERDOWN (4)
When introducing backlight specific constants then it would be good to
get away from the ackward fbdev naming and use something that is more
obvious.
Something like:
#define BACKLIGHT_POWER_ON 0
#define BACKLIGHT_POWER_OFF 4
#define BACKLIGHT_POWER_NORMAL 1 // deprecated; don't use in new code
This will make the code more obvious to read / understand - at least
IMO.
The proposal did not use the BL_CORE_ naming, lets keep this for
suspend/resume stuff.
On top of this - many users of the power states could benefit using the
backlight_enable()/backlight_disable() helpers, but that's another story.
Sam
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [PATCH 01/17] backlight: Add BL_CORE_ constants for power states
2024-06-11 17:55 ` Sam Ravnborg
@ 2024-06-12 7:26 ` Thomas Zimmermann
2024-06-12 10:18 ` Sam Ravnborg
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-12 7:26 UTC (permalink / raw)
To: Sam Ravnborg
Cc: lee, daniel.thompson, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek, dri-devel, linux-fbdev, linux-pwm
Hi Sam,
long time no see.
Am 11.06.24 um 19:55 schrieb Sam Ravnborg:
> Hi Thomas.
>
> On Tue, Jun 11, 2024 at 02:41:56PM +0200, Thomas Zimmermann wrote:
>> Duplicate FB_BLANK_ constants as BL_CORE_ 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.
> Good to remove this dependency.
>> The new BL_CORE 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.
> This seems like the right approach.
>
>> 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 BL_CORE_NORMAL as deprecated. Drivers should be fixed
>> and the constant removed. This affects ams369fg06 and a few DRM
>> panel drivers.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>> Documentation/ABI/stable/sysfs-class-backlight | 7 ++++---
>> include/linux/backlight.h | 16 ++++++++++------
>> 2 files changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
>> index 023fb52645f8b..6102d6bebdf9a 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 19a1c0e22629d..e0cfd89ffadd2 100644
>> --- a/include/linux/backlight.h
>> +++ b/include/linux/backlight.h
>> @@ -210,14 +210,18 @@ struct backlight_properties {
>> * 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.
>> + * modes; 4: full off), see BL_CORE_XXX 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.
>> + * to BL_CORE_UNBLANK. When the backlight device is disabled
>> + * @power is set to BL_CORE_POWERDOWN.
>> */
>> int power;
>>
>> +#define BL_CORE_UNBLANK (0)
>> +#define BL_CORE_NORMAL (1) // deprecated; don't use in new code
>> +#define BL_CORE_POWERDOWN (4)
> When introducing backlight specific constants then it would be good to
> get away from the ackward fbdev naming and use something that is more
> obvious.
>
> Something like:
>
> #define BACKLIGHT_POWER_ON 0
> #define BACKLIGHT_POWER_OFF 4
> #define BACKLIGHT_POWER_NORMAL 1 // deprecated; don't use in new code
Makes perfect sens to me.
>
> This will make the code more obvious to read / understand - at least
> IMO.
>
> The proposal did not use the BL_CORE_ naming, lets keep this for
> suspend/resume stuff.
OK. I only used BL_CORE because it was there already.
>
> On top of this - many users of the power states could benefit using the
> backlight_enable()/backlight_disable() helpers, but that's another story.
Should I attempt to fix that? Many drivers appear to do something like
props.brightness = ...
props.power = UNBLANK
backlight_update_status()
That's the same pattern as in backlight_enable().
Best regards
Thomas
>
> Sam
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [PATCH 01/17] backlight: Add BL_CORE_ constants for power states
2024-06-12 7:26 ` Thomas Zimmermann
@ 2024-06-12 10:18 ` Sam Ravnborg
0 siblings, 0 replies; 21+ messages in thread
From: Sam Ravnborg @ 2024-06-12 10:18 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, daniel.thompson, jingoohan1, deller, linus.walleij,
f.suligoi, ukleinek, dri-devel, linux-fbdev, linux-pwm
Hi Thomas,
On Wed, Jun 12, 2024 at 09:26:11AM +0200, Thomas Zimmermann wrote:
> Hi Sam,
>
> long time no see.
Had some spare time between jobs, started on my new job last week.
Time will tell if there will be energy and time for hobby stuff.
> >
> > On top of this - many users of the power states could benefit using the
> > backlight_enable()/backlight_disable() helpers, but that's another story.
>
> Should I attempt to fix that? Many drivers appear to do something like
>
> props.brightness = ...
> props.power = UNBLANK
> backlight_update_status()
>
> That's the same pattern as in backlight_enable().
I would keep the changes at a minimum, hoping someone else jumps in and
do the cleanup. Then you can keep the patches that remove the fbdev
dependency simple and easy to review (and thus get applied).
Maybe the obvious places, and do the simple replacement for the rest..
The drivers initialize and use the backlight properties in interesting
ways so that would require a bit more effort to implement and review.
I did it once for most of drm - but it was buggy so I ended up scrapping
the patches :-(
Sam
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 02/17] backlight: aat2870-backlight: Use blacklight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
2024-06-11 12:41 ` [PATCH 01/17] backlight: Add BL_CORE_ constants for power states Thomas Zimmermann
@ 2024-06-11 12:41 ` Thomas Zimmermann
2024-06-11 12:41 ` [PATCH 03/17] backlight: ams369fb06: Use backlight " Thomas Zimmermann
` (14 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:41 UTC (permalink / raw)
To: lee, daniel.thompson, 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 b4c3354a1a8a6..94de11b6cdff0 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 = BL_CORE_UNBLANK;
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 = BL_CORE_POWERDOWN;
bd->props.brightness = 0;
backlight_update_status(bd);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 03/17] backlight: ams369fb06: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
2024-06-11 12:41 ` [PATCH 01/17] backlight: Add BL_CORE_ constants for power states Thomas Zimmermann
2024-06-11 12:41 ` [PATCH 02/17] backlight: aat2870-backlight: Use blacklight power constants Thomas Zimmermann
@ 2024-06-11 12:41 ` Thomas Zimmermann
2024-06-11 12:41 ` [PATCH 04/17] backlight: corgi-lcd: " Thomas Zimmermann
` (13 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:41 UTC (permalink / raw)
To: lee, daniel.thompson, 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 57ec205d2bd2a..2e97ff9314af4 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 <= BL_CORE_NORMAL;
}
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 != BL_CORE_UNBLANK && power != BL_CORE_POWERDOWN &&
+ power != BL_CORE_NORMAL) {
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 = BL_CORE_POWERDOWN;
- ams369fg06_power(lcd, FB_BLANK_UNBLANK);
+ ams369fg06_power(lcd, BL_CORE_UNBLANK);
} else {
- lcd->power = FB_BLANK_UNBLANK;
+ lcd->power = BL_CORE_UNBLANK;
}
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, BL_CORE_POWERDOWN);
}
#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, BL_CORE_POWERDOWN);
}
static int ams369fg06_resume(struct device *dev)
{
struct ams369fg06 *lcd = dev_get_drvdata(dev);
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = BL_CORE_POWERDOWN;
- return ams369fg06_power(lcd, FB_BLANK_UNBLANK);
+ return ams369fg06_power(lcd, BL_CORE_UNBLANK);
}
#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, BL_CORE_POWERDOWN);
}
static struct spi_driver ams369fg06_driver = {
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 04/17] backlight: corgi-lcd: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (2 preceding siblings ...)
2024-06-11 12:41 ` [PATCH 03/17] backlight: ams369fb06: Use backlight " Thomas Zimmermann
@ 2024-06-11 12:41 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 05/17] backlight: gpio-backlight: " Thomas Zimmermann
` (12 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:41 UTC (permalink / raw)
To: lee, daniel.thompson, 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 aad1680c9075d..b29ee8579b57e 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 = BL_CORE_UNBLANK;
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 = BL_CORE_UNBLANK;
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] 21+ messages in thread* [PATCH 05/17] backlight: gpio-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (3 preceding siblings ...)
2024-06-11 12:41 ` [PATCH 04/17] backlight: corgi-lcd: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
` (11 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 4476c317ce293..8e41f8ebdc51c 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 ? BL_CORE_UNBLANK
+ : BL_CORE_POWERDOWN;
else if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
- bl->props.power = FB_BLANK_POWERDOWN;
+ bl->props.power = BL_CORE_POWERDOWN;
else
- bl->props.power = FB_BLANK_UNBLANK;
+ bl->props.power = BL_CORE_UNBLANK;
bl->props.brightness = 1;
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 06/17] backlight: ipaq-micro-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (4 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 05/17] backlight: gpio-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 07/17] backlight: journada_bl: " Thomas Zimmermann
` (10 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 f595b8c8cbb24..d3be6d2d7493a 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 = BL_CORE_UNBLANK,
.brightness = 64,
};
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 07/17] backlight: journada_bl: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (5 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 06/17] backlight: ipaq-micro-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 08/17] backlight: kb3886-bl: " Thomas Zimmermann
` (9 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 066d0dc98f607..d296799ba9d14 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 = BL_CORE_UNBLANK;
bd->props.brightness = BL_DEF_BRIGHT;
/*
* note. make sure max brightness is set otherwise
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 08/17] backlight: kb3886-bl: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (6 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 07/17] backlight: journada_bl: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 09/17] backlight: ktd253-backlight: " Thomas Zimmermann
` (8 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 55794b239cff0..0370f52077d75 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 = BL_CORE_UNBLANK;
kb3886_backlight_device->props.brightness = machinfo->default_intensity;
backlight_update_status(kb3886_backlight_device);
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 09/17] backlight: ktd253-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (7 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 08/17] backlight: kb3886-bl: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 10/17] backlight: led-backlight: " Thomas Zimmermann
` (7 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 d7d43454f64a2..4cc8ea3ea7f5a 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 = BL_CORE_UNBLANK;
} else {
bl->props.brightness = 0;
- bl->props.power = FB_BLANK_POWERDOWN;
+ bl->props.power = BL_CORE_POWERDOWN;
}
ktd253->bl = bl;
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 10/17] backlight: led-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (8 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 09/17] backlight: ktd253-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 11/17] backlight: lm3533-backlight: " Thomas Zimmermann
` (6 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 032f8bddf8721..5c8db81600902 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) ? BL_CORE_POWERDOWN :
+ BL_CORE_UNBLANK;
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] 21+ messages in thread* [PATCH 11/17] backlight: lm3533-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (9 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 10/17] backlight: led-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 12/17] backlight: mp3309c: " Thomas Zimmermann
` (5 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 3e10d480cb7f0..a48b835843f2d 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 = BL_CORE_POWERDOWN;
bd->props.brightness = 0;
lm3533_ctrlbank_disable(&bl->cb);
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 12/17] backlight: mp3309c: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (10 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 11/17] backlight: lm3533-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 13/17] backlight: pandora-backlight: " Thomas Zimmermann
` (4 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 a28036c964aff..eb001b47693e2 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 = BL_CORE_UNBLANK;
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 = BL_CORE_POWERDOWN;
bl->props.brightness = 0;
backlight_update_status(chip->bl);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 13/17] backlight: pandora-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (11 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 12/17] backlight: mp3309c: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 14/17] backlight: pcf50633-backlight: " Thomas Zimmermann
` (3 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 51faa889e01f4..11b280f39a0c1 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 != BL_CORE_UNBLANK)
brightness = 0;
if (bl->props.state & BL_CORE_FBBLANK)
brightness = 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 14/17] backlight: pcf50633-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (12 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 13/17] backlight: pandora-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 15/17] backlight: pwm-backlight: " Thomas Zimmermann
` (2 subsequent siblings)
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 540dd3380c81d..f75cd5e98f2be 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 != BL_CORE_UNBLANK)
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 = BL_CORE_UNBLANK;
if (pdata) {
bl_props.brightness = pdata->default_brightness;
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 15/17] backlight: pwm-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (13 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 14/17] backlight: pcf50633-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 16/17] backlight: rave-sp-backlight: " Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 17/17] backlight: sky81452-backlight: " Thomas Zimmermann
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 61d30bc98eea5..c9b5224464311 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 BL_CORE_UNBLANK;
/*
* 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 ? BL_CORE_UNBLANK : BL_CORE_POWERDOWN;
}
static int pwm_backlight_probe(struct platform_device *pdev)
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 16/17] backlight: rave-sp-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (14 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 15/17] backlight: pwm-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
2024-06-11 12:42 ` [PATCH 17/17] backlight: sky81452-backlight: " Thomas Zimmermann
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 05b5f003a3d1a..7a564a4e46e07 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 == BL_CORE_UNBLANK) ? 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] 21+ messages in thread* [PATCH 17/17] backlight: sky81452-backlight: Use backlight power constants
2024-06-11 12:41 [PATCH 00/17] backlight: Introduce power-state constants Thomas Zimmermann
` (15 preceding siblings ...)
2024-06-11 12:42 ` [PATCH 16/17] backlight: rave-sp-backlight: " Thomas Zimmermann
@ 2024-06-11 12:42 ` Thomas Zimmermann
16 siblings, 0 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2024-06-11 12:42 UTC (permalink / raw)
To: lee, daniel.thompson, 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 19f9f84a9fd6e..d76ac7c5cd990 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 = BL_CORE_UNBLANK;
bd->props.brightness = 0;
backlight_update_status(bd);
--
2.45.2
^ permalink raw reply related [flat|nested] 21+ messages in thread