Skip to contentSkip to conversation

platform: x86: Use backlight power constants

PATCH In review Thomas Zimmermann 3 participants 13 messages Jul 31, 2024 – Aug 12, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover platform: x86: Use backlight power constants

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

 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(-)
Signature · 1 line
2.45.2
#1 lore raw

PATCH 1/10 platform/x86: acer-wmi: Use backlight power constants

Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics.

Cc "Lee, Chun-Yi" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/acer-wmi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/acer-wmi.c +1 -2
index 38c932df6446..349169d050c5 100644
@@ -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;
Signature · 1 line
2.45.2
#2 lore raw

PATCH 2/10 platform/x86: asus-laptop: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc "Luke D. Jones" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/asus-laptop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/asus-laptop.c +1 -2
index ccb33d034e2a..9d7e6b712abf 100644
@@ -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;
 }
Signature · 1 line
2.45.2
#3 lore raw

PATCH 3/10 platform/x86: asus-nb-wmi: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc "Luke D. Jones" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/asus-nb-wmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-nb-wmi.c +2 -2
index fceffe2082ec..e20e241bda98 100644
@@ -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)
Signature · 1 line
2.45.2
#4 lore raw

PATCH 4/10 platform/x86: asus-wmi: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc "Luke D. Jones" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/asus-wmi.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/platform/x86/asus-wmi.c +8 -9
index cc735931f97b..39fa651fc9a2 100644
@@ -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;
Signature · 1 line
2.45.2
#5 lore raw

PATCH 5/10 platform/x86: eeepc-laptop: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc "Luke D. Jones" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/eeepc-laptop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/eeepc-laptop.c +1 -2
index 447364bed249..03319a80e114 100644
@@ -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;
 }
Signature · 1 line
2.45.2
#6 lore raw

PATCH 6/10 platform/x86: eeepc-wmi: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc "Luke D. Jones" <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/eeepc-wmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/eeepc-wmi.c +2 -2
index 32d9f0ba6be3..37edb9ae67b8 100644
@@ -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 = {
Signature · 1 line
2.45.2
#7 lore raw

PATCH 7/10 platform/x86: fujitsu-laptop: Use backlight power constants

In reply to 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.

Cc Jonathan Woithe <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/platform/x86/fujitsu-laptop.c +4 -5
index 968fc91bd5e4..ae992ac1ab4a 100644
@@ -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);
Signature · 1 line
2.45.2
maintainer Acked-by on v1 7/10
#8 lore raw

Re: [PATCH 07/10] platform/x86: fujitsu-laptop: Use backlight power constants

Quoted 8 lines · 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.

Cc Jonathan Woithe <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>

I see no issues as far as fujitsu-laptop is concerned.

Regards
jonathan

Quoted 48 lines
---
 drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/platform/x86/fujitsu-laptop.c +4 -5
index 968fc91bd5e4..ae992ac1ab4a 100644
@@ -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);
Signature · 1 line
2.45.2
#9 lore raw

PATCH 8/10 platform/x86: ideapad-laptop: Use backlight power constants

In reply to 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.

Cc Ike Panhc <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/ideapad-laptop.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/platform/x86/ideapad-laptop.c +3 -4
index 1ace711f7442..8270925db03f 100644
@@ -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)
Signature · 1 line
2.45.2
#10 lore raw

PATCH 9/10 platform/x86: oaktrail: Use backlight power constants

In reply to 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.

Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/intel/oaktrail.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/intel/oaktrail.c +1 -2
index 217630f40c3f..265cef327b4f 100644
@@ -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;
Signature · 1 line
2.45.2
#11 lore raw

PATCH 10/10 platform/x86: samsung-laptop: Use backlight power constants

In reply to 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.

Cc Corentin Chary <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ilpo Järvinen" <[email protected]>
---
 drivers/platform/x86/samsung-laptop.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/platform/x86/samsung-laptop.c +2 -3
index 3d2f8e758369..0d3e3ca20b1b 100644
@@ -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;
Signature · 1 line
2.45.2
#12 lore raw
In reply to Thomas Zimmermann

Hi,

Quoted 8 lines · Thomas Zimmermann

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.

Quoted 11 lines

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

Quoted 12 lines
 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(-)