* [PATCH 01/10] platform/x86: acer-wmi: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 02/10] platform/x86: asus-laptop: " Thomas Zimmermann
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Lee, Chun-Yi
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: "Lee, Chun-Yi" <jlee@suse.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/acer-wmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 38c932df6446..349169d050c5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -16,7 +16,6 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/dmi.h>
-#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
@@ -1685,7 +1684,7 @@ static int acer_backlight_init(struct device *dev)
acer_backlight_device = bd;
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
bd->props.brightness = read_brightness(bd);
backlight_update_status(bd);
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 02/10] platform/x86: asus-laptop: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 01/10] platform/x86: acer-wmi: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 03/10] platform/x86: asus-nb-wmi: " Thomas Zimmermann
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary, Luke D. Jones
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: Corentin Chary <corentin.chary@gmail.com>
Cc: "Luke D. Jones" <luke@ljones.dev>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/asus-laptop.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index ccb33d034e2a..9d7e6b712abf 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -28,7 +28,6 @@
#include <linux/err.h>
#include <linux/proc_fs.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
@@ -818,7 +817,7 @@ static int asus_backlight_init(struct asus_laptop *asus)
asus->backlight_device = bd;
bd->props.brightness = asus_read_brightness(bd);
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
backlight_update_status(bd);
return 0;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 03/10] platform/x86: asus-nb-wmi: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 01/10] platform/x86: acer-wmi: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 02/10] platform/x86: asus-laptop: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 04/10] platform/x86: asus-wmi: " Thomas Zimmermann
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary, Luke D. Jones
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: Corentin Chary <corentin.chary@gmail.com>
Cc: "Luke D. Jones" <luke@ljones.dev>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/asus-nb-wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index fceffe2082ec..e20e241bda98 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -7,12 +7,12 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/backlight.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
-#include <linux/fb.h>
#include <linux/dmi.h>
#include <linux/i8042.h>
@@ -525,7 +525,7 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
dmi_check_system(asus_quirks);
driver->quirks = quirks;
- driver->panel_power = FB_BLANK_UNBLANK;
+ driver->panel_power = BACKLIGHT_POWER_ON;
/* overwrite the wapf setting if the wapf paramater is specified */
if (wapf != -1)
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 04/10] platform/x86: asus-wmi: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (2 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 03/10] platform/x86: asus-nb-wmi: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 05/10] platform/x86: eeepc-laptop: " Thomas Zimmermann
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary, Luke D. Jones
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: Corentin Chary <corentin.chary@gmail.com>
Cc: "Luke D. Jones" <luke@ljones.dev>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/asus-wmi.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index cc735931f97b..39fa651fc9a2 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -18,7 +18,6 @@
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/dmi.h>
-#include <linux/fb.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/init.h>
@@ -3860,7 +3859,7 @@ static int read_backlight_power(struct asus_wmi *asus)
if (ret < 0)
return ret;
- return ret ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
+ return ret ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
}
static int read_brightness_max(struct asus_wmi *asus)
@@ -3919,7 +3918,7 @@ static int update_bl_status(struct backlight_device *bd)
power = read_backlight_power(asus);
if (power != -ENODEV && bd->props.power != power) {
- ctrl_param = !!(bd->props.power == FB_BLANK_UNBLANK);
+ ctrl_param = !!(bd->props.power == BACKLIGHT_POWER_ON);
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT,
ctrl_param, NULL);
if (asus->driver->quirks->store_backlight_power)
@@ -3978,7 +3977,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus)
power = read_backlight_power(asus);
if (power == -ENODEV)
- power = FB_BLANK_UNBLANK;
+ power = BACKLIGHT_POWER_ON;
else if (power < 0)
return power;
@@ -4036,7 +4035,7 @@ static int read_screenpad_backlight_power(struct asus_wmi *asus)
if (ret < 0)
return ret;
/* 1 == powered */
- return ret ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
+ return ret ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
}
static int read_screenpad_brightness(struct backlight_device *bd)
@@ -4049,7 +4048,7 @@ static int read_screenpad_brightness(struct backlight_device *bd)
if (err < 0)
return err;
/* The device brightness can only be read if powered, so return stored */
- if (err == FB_BLANK_POWERDOWN)
+ if (err == BACKLIGHT_POWER_OFF)
return asus->driver->screenpad_brightness - ASUS_SCREENPAD_BRIGHT_MIN;
err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_SCREENPAD_LIGHT, &retval);
@@ -4070,7 +4069,7 @@ static int update_screenpad_bl_status(struct backlight_device *bd)
return power;
if (bd->props.power != power) {
- if (power != FB_BLANK_UNBLANK) {
+ if (power != BACKLIGHT_POWER_ON) {
/* Only brightness > 0 can power it back on */
ctrl_param = asus->driver->screenpad_brightness - ASUS_SCREENPAD_BRIGHT_MIN;
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_LIGHT,
@@ -4078,7 +4077,7 @@ static int update_screenpad_bl_status(struct backlight_device *bd)
} else {
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_POWER, 0, NULL);
}
- } else if (power == FB_BLANK_UNBLANK) {
+ } else if (power == BACKLIGHT_POWER_ON) {
/* Only set brightness if powered on or we get invalid/unsync state */
ctrl_param = bd->props.brightness + ASUS_SCREENPAD_BRIGHT_MIN;
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_LIGHT, ctrl_param, NULL);
@@ -4108,7 +4107,7 @@ static int asus_screenpad_init(struct asus_wmi *asus)
if (power < 0)
return power;
- if (power != FB_BLANK_POWERDOWN) {
+ if (power != BACKLIGHT_POWER_OFF) {
err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_SCREENPAD_LIGHT, &brightness);
if (err < 0)
return err;
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 05/10] platform/x86: eeepc-laptop: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (3 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 04/10] platform/x86: asus-wmi: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 06/10] platform/x86: eeepc-wmi: " Thomas Zimmermann
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary, Luke D. Jones
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: Corentin Chary <corentin.chary@gmail.com>
Cc: "Luke D. Jones" <luke@ljones.dev>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/eeepc-laptop.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 447364bed249..03319a80e114 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -15,7 +15,6 @@
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/slab.h>
@@ -1137,7 +1136,7 @@ static int eeepc_backlight_init(struct eeepc_laptop *eeepc)
}
eeepc->backlight_device = bd;
bd->props.brightness = read_brightness(bd);
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
backlight_update_status(bd);
return 0;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 06/10] platform/x86: eeepc-wmi: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (4 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 05/10] platform/x86: eeepc-laptop: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 07/10] platform/x86: fujitsu-laptop: " Thomas Zimmermann
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary, Luke D. Jones
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: Corentin Chary <corentin.chary@gmail.com>
Cc: "Luke D. Jones" <luke@ljones.dev>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/eeepc-wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 32d9f0ba6be3..37edb9ae67b8 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -13,13 +13,13 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/backlight.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/dmi.h>
-#include <linux/fb.h>
#include <linux/acpi.h>
#include "asus-wmi.h"
@@ -192,7 +192,7 @@ static void eeepc_wmi_quirks(struct asus_wmi_driver *driver)
driver->quirks = quirks;
driver->quirks->wapf = -1;
- driver->panel_power = FB_BLANK_UNBLANK;
+ driver->panel_power = BACKLIGHT_POWER_ON;
}
static struct asus_wmi_driver asus_wmi_driver = {
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 07/10] platform/x86: fujitsu-laptop: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (5 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 06/10] platform/x86: eeepc-wmi: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 13:21 ` Jonathan Woithe
2024-07-31 12:50 ` [PATCH 08/10] platform/x86: ideapad-laptop: " Thomas Zimmermann
` (3 subsequent siblings)
10 siblings, 1 reply; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Jonathan Woithe
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: Jonathan Woithe <jwoithe@just42.net>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 968fc91bd5e4..ae992ac1ab4a 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -43,7 +43,6 @@
#include <linux/bitops.h>
#include <linux/dmi.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kfifo.h>
@@ -356,7 +355,7 @@ static int bl_get_brightness(struct backlight_device *b)
{
struct acpi_device *device = bl_get_data(b);
- return b->props.power == FB_BLANK_POWERDOWN ? 0 : get_lcd_level(device);
+ return b->props.power == BACKLIGHT_POWER_OFF ? 0 : get_lcd_level(device);
}
static int bl_update_status(struct backlight_device *b)
@@ -364,7 +363,7 @@ static int bl_update_status(struct backlight_device *b)
struct acpi_device *device = bl_get_data(b);
if (fext) {
- if (b->props.power == FB_BLANK_POWERDOWN)
+ if (b->props.power == BACKLIGHT_POWER_OFF)
call_fext_func(fext, FUNC_BACKLIGHT, 0x1,
BACKLIGHT_PARAM_POWER, BACKLIGHT_OFF);
else
@@ -933,9 +932,9 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)
acpi_video_get_backlight_type() == acpi_backlight_vendor) {
if (call_fext_func(fext, FUNC_BACKLIGHT, 0x2,
BACKLIGHT_PARAM_POWER, 0x0) == BACKLIGHT_OFF)
- fujitsu_bl->bl_device->props.power = FB_BLANK_POWERDOWN;
+ fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_OFF;
else
- fujitsu_bl->bl_device->props.power = FB_BLANK_UNBLANK;
+ fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_ON;
}
ret = acpi_fujitsu_laptop_input_setup(device);
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 07/10] platform/x86: fujitsu-laptop: Use backlight power constants
2024-07-31 12:50 ` [PATCH 07/10] platform/x86: fujitsu-laptop: " Thomas Zimmermann
@ 2024-07-31 13:21 ` Jonathan Woithe
0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Woithe @ 2024-07-31 13:21 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: hdegoede, ilpo.jarvinen, platform-driver-x86, linux-kernel
On Wed, Jul 31, 2024 at 02:50:57PM +0200, Thomas Zimmermann wrote:
> 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: Jonathan Woithe <jwoithe@just42.net>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
I see no issues as far as fujitsu-laptop is concerned.
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Regards
jonathan
> ---
> drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 968fc91bd5e4..ae992ac1ab4a 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/drivers/platform/x86/fujitsu-laptop.c
> @@ -43,7 +43,6 @@
> #include <linux/bitops.h>
> #include <linux/dmi.h>
> #include <linux/backlight.h>
> -#include <linux/fb.h>
> #include <linux/input.h>
> #include <linux/input/sparse-keymap.h>
> #include <linux/kfifo.h>
> @@ -356,7 +355,7 @@ static int bl_get_brightness(struct backlight_device *b)
> {
> struct acpi_device *device = bl_get_data(b);
>
> - return b->props.power == FB_BLANK_POWERDOWN ? 0 : get_lcd_level(device);
> + return b->props.power == BACKLIGHT_POWER_OFF ? 0 : get_lcd_level(device);
> }
>
> static int bl_update_status(struct backlight_device *b)
> @@ -364,7 +363,7 @@ static int bl_update_status(struct backlight_device *b)
> struct acpi_device *device = bl_get_data(b);
>
> if (fext) {
> - if (b->props.power == FB_BLANK_POWERDOWN)
> + if (b->props.power == BACKLIGHT_POWER_OFF)
> call_fext_func(fext, FUNC_BACKLIGHT, 0x1,
> BACKLIGHT_PARAM_POWER, BACKLIGHT_OFF);
> else
> @@ -933,9 +932,9 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)
> acpi_video_get_backlight_type() == acpi_backlight_vendor) {
> if (call_fext_func(fext, FUNC_BACKLIGHT, 0x2,
> BACKLIGHT_PARAM_POWER, 0x0) == BACKLIGHT_OFF)
> - fujitsu_bl->bl_device->props.power = FB_BLANK_POWERDOWN;
> + fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_OFF;
> else
> - fujitsu_bl->bl_device->props.power = FB_BLANK_UNBLANK;
> + fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_ON;
> }
>
> ret = acpi_fujitsu_laptop_input_setup(device);
> --
> 2.45.2
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 08/10] platform/x86: ideapad-laptop: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (6 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 07/10] platform/x86: fujitsu-laptop: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 09/10] platform/x86: oaktrail: " Thomas Zimmermann
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann, Ike Panhc
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: Ike Panhc <ike.pan@canonical.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/ideapad-laptop.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 1ace711f7442..8270925db03f 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -17,7 +17,6 @@
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/dmi.h>
-#include <linux/fb.h>
#include <linux/i8042.h>
#include <linux/init.h>
#include <linux/input.h>
@@ -1256,7 +1255,7 @@ static int ideapad_backlight_update_status(struct backlight_device *blightdev)
return err;
err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER,
- blightdev->props.power != FB_BLANK_POWERDOWN);
+ blightdev->props.power != BACKLIGHT_POWER_OFF);
if (err)
return err;
@@ -1306,7 +1305,7 @@ static int ideapad_backlight_init(struct ideapad_private *priv)
priv->blightdev = blightdev;
blightdev->props.brightness = now;
- blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
+ blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
backlight_update_status(blightdev);
@@ -1330,7 +1329,7 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv)
if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power))
return;
- blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
+ blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
}
static void ideapad_backlight_notify_brightness(struct ideapad_private *priv)
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 09/10] platform/x86: oaktrail: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (7 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 08/10] platform/x86: ideapad-laptop: " Thomas Zimmermann
@ 2024-07-31 12:50 ` Thomas Zimmermann
2024-07-31 12:51 ` [PATCH 10/10] platform/x86: samsung-laptop: " Thomas Zimmermann
2024-08-12 14:29 ` [PATCH 00/10] platform: x86: " Hans de Goede
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:50 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, 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: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/intel/oaktrail.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel/oaktrail.c b/drivers/platform/x86/intel/oaktrail.c
index 217630f40c3f..265cef327b4f 100644
--- a/drivers/platform/x86/intel/oaktrail.c
+++ b/drivers/platform/x86/intel/oaktrail.c
@@ -28,7 +28,6 @@
#include <linux/backlight.h>
#include <linux/dmi.h>
#include <linux/err.h>
-#include <linux/fb.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -250,7 +249,7 @@ static int oaktrail_backlight_init(void)
oaktrail_bl_device = bd;
bd->props.brightness = get_backlight_brightness(bd);
- bd->props.power = FB_BLANK_UNBLANK;
+ bd->props.power = BACKLIGHT_POWER_ON;
backlight_update_status(bd);
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 10/10] platform/x86: samsung-laptop: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (8 preceding siblings ...)
2024-07-31 12:50 ` [PATCH 09/10] platform/x86: oaktrail: " Thomas Zimmermann
@ 2024-07-31 12:51 ` Thomas Zimmermann
2024-08-12 14:29 ` [PATCH 00/10] platform: x86: " Hans de Goede
10 siblings, 0 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2024-07-31 12:51 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Thomas Zimmermann,
Corentin Chary
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: Corentin Chary <corentin.chary@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/samsung-laptop.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 3d2f8e758369..0d3e3ca20b1b 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -14,7 +14,6 @@
#include <linux/pci.h>
#include <linux/backlight.h>
#include <linux/leds.h>
-#include <linux/fb.h>
#include <linux/dmi.h>
#include <linux/platform_device.h>
#include <linux/rfkill.h>
@@ -554,7 +553,7 @@ static int update_status(struct backlight_device *bd)
set_brightness(samsung, bd->props.brightness);
- if (bd->props.power == FB_BLANK_UNBLANK)
+ if (bd->props.power == BACKLIGHT_POWER_ON)
sabi_set_commandb(samsung, commands->set_backlight, 1);
else
sabi_set_commandb(samsung, commands->set_backlight, 0);
@@ -1189,7 +1188,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung)
samsung->backlight_device = bd;
samsung->backlight_device->props.brightness = read_brightness(samsung);
- samsung->backlight_device->props.power = FB_BLANK_UNBLANK;
+ samsung->backlight_device->props.power = BACKLIGHT_POWER_ON;
backlight_update_status(samsung->backlight_device);
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 00/10] platform: x86: Use backlight power constants
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
` (9 preceding siblings ...)
2024-07-31 12:51 ` [PATCH 10/10] platform/x86: samsung-laptop: " Thomas Zimmermann
@ 2024-08-12 14:29 ` Hans de Goede
10 siblings, 0 replies; 13+ messages in thread
From: Hans de Goede @ 2024-08-12 14:29 UTC (permalink / raw)
To: Thomas Zimmermann, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel
Hi,
On 7/31/24 2:50 PM, Thomas Zimmermann wrote:
> Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for
> power states") introduced dedicated constants for backlight power states.
> Convert X86 platform 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 (10):
> platform/x86: acer-wmi: Use backlight power constants
> platform/x86: asus-laptop: Use backlight power constants
> platform/x86: asus-nb-wmi: Use backlight power constants
> platform/x86: asus-wmi: Use backlight power constants
> platform/x86: eeepc-laptop: Use backlight power constants
> platform/x86: eeepc-wmi: Use backlight power constants
> platform/x86: fujitsu-laptop: Use backlight power constants
> platform/x86: ideapad-laptop: Use backlight power constants
> platform/x86: oaktrail: Use backlight power constants
> platform/x86: samsung-laptop: Use backlight power constants
Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> drivers/platform/x86/acer-wmi.c | 3 +--
> drivers/platform/x86/asus-laptop.c | 3 +--
> drivers/platform/x86/asus-nb-wmi.c | 4 ++--
> drivers/platform/x86/asus-wmi.c | 17 ++++++++---------
> drivers/platform/x86/eeepc-laptop.c | 3 +--
> drivers/platform/x86/eeepc-wmi.c | 4 ++--
> drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
> drivers/platform/x86/ideapad-laptop.c | 7 +++----
> drivers/platform/x86/intel/oaktrail.c | 3 +--
> drivers/platform/x86/samsung-laptop.c | 5 ++---
> 10 files changed, 25 insertions(+), 33 deletions(-)
>
^ permalink raw reply [flat|nested] 13+ messages in thread