* [PATCH 0/2] staging: Use backlight power constants
@ 2024-07-31 12:58 Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 1/2] staging: fbtft: " Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 2/2] staging: olpc_dcon: " Thomas Zimmermann
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:58 UTC (permalink / raw)
To: gregkh, deller; +Cc: dri-devel, linux-fbdev, linux-staging, Thomas Zimmermann
Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for
power states") introduced dedicated constants for backlight power states.
Convert staging drivers to the new constants.
The new constants replace the fbdev constants. This is part of a larger
effort to make kernel subsystems more independent from fbdev code and
headers.
Thomas Zimmermann (2):
staging: fbtft: Use backlight power constants
staging: olpc_dcon: Use backlight power constants
drivers/staging/fbtft/fb_ssd1351.c | 2 +-
drivers/staging/fbtft/fbtft-core.c | 6 +++---
drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] staging: fbtft: Use backlight power constants
2024-07-31 12:58 [PATCH 0/2] staging: Use backlight power constants Thomas Zimmermann
@ 2024-07-31 12:58 ` Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 2/2] staging: olpc_dcon: " Thomas Zimmermann
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:58 UTC (permalink / raw)
To: gregkh, deller; +Cc: dri-devel, linux-fbdev, linux-staging, Thomas Zimmermann
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/fbtft/fb_ssd1351.c | 2 +-
drivers/staging/fbtft/fbtft-core.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index ca2cba2185ae..cee4cecb23a5 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -213,7 +213,7 @@ static void register_onboard_backlight(struct fbtft_par *par)
struct backlight_properties bl_props = { 0, };
bl_props.type = BACKLIGHT_RAW;
- bl_props.power = FB_BLANK_POWERDOWN;
+ bl_props.power = BACKLIGHT_POWER_OFF;
bd = backlight_device_register(dev_driver_string(par->info->device),
par->info->device, par, &bl_ops,
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 8e2fd0c0fee2..ab53698dae32 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -152,7 +152,7 @@ static int fbtft_backlight_get_brightness(struct backlight_device *bd)
void fbtft_unregister_backlight(struct fbtft_par *par)
{
if (par->info->bl_dev) {
- par->info->bl_dev->props.power = FB_BLANK_POWERDOWN;
+ par->info->bl_dev->props.power = BACKLIGHT_POWER_OFF;
backlight_update_status(par->info->bl_dev);
backlight_device_unregister(par->info->bl_dev);
par->info->bl_dev = NULL;
@@ -178,7 +178,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
bl_props.type = BACKLIGHT_RAW;
/* Assume backlight is off, get polarity from current state of pin */
- bl_props.power = FB_BLANK_POWERDOWN;
+ bl_props.power = BACKLIGHT_POWER_OFF;
if (!gpiod_get_value(par->gpio.led[0]))
par->polarity = true;
@@ -801,7 +801,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
/* Turn on backlight if available */
if (fb_info->bl_dev) {
- fb_info->bl_dev->props.power = FB_BLANK_UNBLANK;
+ fb_info->bl_dev->props.power = BACKLIGHT_POWER_ON;
fb_info->bl_dev->ops->update_status(fb_info->bl_dev);
}
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] staging: olpc_dcon: Use backlight power constants
2024-07-31 12:58 [PATCH 0/2] staging: Use backlight power constants Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 1/2] staging: fbtft: " Thomas Zimmermann
@ 2024-07-31 12:58 ` Thomas Zimmermann
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:58 UTC (permalink / raw)
To: gregkh, deller
Cc: dri-devel, linux-fbdev, linux-staging, Thomas Zimmermann,
Jens Frederich, Jon Nettleton
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jens Frederich <jfrederich@gmail.com>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 08ec3aae90ea..4cb904a5f8f4 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -544,7 +544,7 @@ static const struct backlight_ops dcon_bl_ops = {
static struct backlight_properties dcon_bl_props = {
.max_brightness = 15,
.type = BACKLIGHT_RAW,
- .power = FB_BLANK_UNBLANK,
+ .power = BACKLIGHT_POWER_ON,
};
static int dcon_reboot_notify(struct notifier_block *nb,
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-31 13:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 12:58 [PATCH 0/2] staging: Use backlight power constants Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 1/2] staging: fbtft: " Thomas Zimmermann
2024-07-31 12:58 ` [PATCH 2/2] staging: olpc_dcon: " Thomas Zimmermann
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).