Skip to contentSkip to conversation

backlight: Do not include <linux/fb.h> in header file

PATCH Applied Thomas Zimmermann 7 participants 41 messages Jul 15, 2025 – Oct 1, 2025

Subsystems (10)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

v2 cover backlight: Do not include <linux/fb.h> in header file

Remove the final dependencies on fbdev from the backlight subsystem. This is really just the include of <linux/fb.h> in backlight, but it has some fallout in other code.

Patches 1 to 14 fix all the implicit includes that come from fb.h throughout the kernel. It's all trivial, but touches various drivers. Maintainers are in CC. Patch 15 fixes the backlight header.

With the series applied the backlight subsystem should be free from fbdev dependencies.

v2:
- add missing clean ups in jornada720, rave-sp, rt4831

Thomas Zimmermann (15):
platform/x86: dell-uart-backlight: Use blacklight power constant drm/panel: panel-samsung-s6e63m0: Include <linux/of.h> drm/panel: panel-samsung-s6e88a0-ams427ap24: Include <linux/of.h> drm/panel: panel-summit: Include <linux/of.h>
fbcon: Add necessary include statements and forward declarations
backlight: Include <linux/of.h>
backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>
backlight: as3711_bl: Include <linux/of.h>
backlight: da9052_bl: Include <linux/mod_devicetable.h>
backlight: jornada720: Include <linux/io.h>
backlight: ktd2801: Include <linux/mod_devicetable.h>
backlight: led_bl: Include <linux/of.h>
backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>
backlight: rt4831: Include <linux/mod_devicetable.h>
backlight: Do not include <linux/fb.h> in header file

 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c            | 1 +
 drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c | 1 +
 drivers/gpu/drm/panel/panel-summit.c                     | 1 +
 drivers/platform/x86/dell/dell-uart-backlight.c          | 2 +-
 drivers/video/backlight/apple_dwi_bl.c                   | 1 +
 drivers/video/backlight/as3711_bl.c                      | 1 +
 drivers/video/backlight/backlight.c                      | 1 +
 drivers/video/backlight/da9052_bl.c                      | 1 +
 drivers/video/backlight/jornada720_bl.c                  | 1 +
 drivers/video/backlight/ktd2801-backlight.c              | 1 +
 drivers/video/backlight/led_bl.c                         | 1 +
 drivers/video/backlight/rave-sp-backlight.c              | 2 ++
 drivers/video/backlight/rt4831-backlight.c               | 1 +
 include/linux/backlight.h                                | 1 -
 include/linux/fbcon.h                                    | 7 +++++++
 15 files changed, 21 insertions(+), 2 deletions(-)
Signature · 1 line
2.50.0
author maintainer
#1 lore raw

PATCH v2 1/15 platform/x86: dell-uart-backlight: Use blacklight power constant

The backlight subsystem has gotten its own power constants. Replace FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.

---
 drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-uart-backlight.c +1 -1
index 8f868f845350..f323a667dc2d 100644
@@ -305,7 +305,7 @@ static int dell_uart_bl_serdev_probe(struct serdev_device *serdev)
 	dev_dbg(dev, "Firmware version: %.*s\n", resp[RESP_LEN] - 3, resp + RESP_DATA);
 
 	/* Initialize bl_power to a known value */
-	ret = dell_uart_set_bl_power(dell_bl, FB_BLANK_UNBLANK);
+	ret = dell_uart_set_bl_power(dell_bl, BACKLIGHT_POWER_ON);
 	if (ret)
 		return ret;
 
Signature · 1 line
2.50.0
maintainer
#2 lore raw

Re: [PATCH v2 01/15] platform/x86: dell-uart-backlight: Use blacklight power constant

Quoted 15 lines · Thomas Zimmermann

The backlight subsystem has gotten its own power constants. Replace FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.

---
 drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-uart-backlight.c +0 -0
index 8f868f845350..f323a667dc2d 100644

drivers/platform/x86/dell/dell-uart-backlight.c static int dell_uart_bl_serdev_probe(struct serdev_device *serdev) · line 310

Quoted 7 lines
drivers/platform/x86/dell/dell-uart-backlight.c +1 -1
@@ -305,7 +305,7 @@ static int dell_uart_bl_serdev_probe(struct serdev_device *serdev)
 	dev_dbg(dev, "Firmware version: %.*s\n", resp[RESP_LEN] - 3, resp + RESP_DATA);
 
 	/* Initialize bl_power to a known value */
-	ret = dell_uart_set_bl_power(dell_bl, FB_BLANK_UNBLANK);
+	ret = dell_uart_set_bl_power(dell_bl, BACKLIGHT_POWER_ON);
 	if (ret)
 		return ret;

Hi Thomas,

Do you expect this entire series to go in this cycle through some other tree than pdx86? If not, I'll take this through pdx86 tree in this cycle.

Signature · 1 line
 i.
author maintainer
#3 lore raw

Re: [PATCH v2 01/15] platform/x86: dell-uart-backlight: Use blacklight power constant

Hi

Am 21.07.25 um 13:43 schrieb Ilpo Järvinen:

Quoted 26 lines · Thomas Zimmermann
Quoted 16 lines

The backlight subsystem has gotten its own power constants. Replace FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.

---
  drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-uart-backlight.c +0 -0
index 8f868f845350..f323a667dc2d 100644

drivers/platform/x86/dell/dell-uart-backlight.c static int dell_uart_bl_serdev_probe(struct serdev_device *serdev) · line 310

Quoted 7 lines
drivers/platform/x86/dell/dell-uart-backlight.c +1 -1
@@ -305,7 +305,7 @@ static int dell_uart_bl_serdev_probe(struct serdev_device *serdev)
  	dev_dbg(dev, "Firmware version: %.*s\n", resp[RESP_LEN] - 3, resp + RESP_DATA);
 
  	/* Initialize bl_power to a known value */
-	ret = dell_uart_set_bl_power(dell_bl, FB_BLANK_UNBLANK);
+	ret = dell_uart_set_bl_power(dell_bl, BACKLIGHT_POWER_ON);
  	if (ret)
  		return ret;

Hi Thomas,

Quoted 2 lines

Do you expect this entire series to go in this cycle through some other tree than pdx86? If not, I'll take this through pdx86 tree in this cycle.

I don't know when the series will get merged, but it might still take a bit. Please take this patch through your tree. Good to have it off the list.

Best regards
Thomas

Quoted 1 line
Signature · 7 lines
--
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)
maintainer Applied
#4 lore raw

Re: [PATCH v2 01/15] platform/x86: dell-uart-backlight: Use blacklight power constant

Quoted 31 lines · Thomas Zimmermann

Hi

Am 21.07.25 um 13:43 schrieb Ilpo Järvinen:

Quoted 28 lines · Thomas Zimmermann
Quoted 17 lines

The backlight subsystem has gotten its own power constants. Replace FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.

---
  drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-uart-backlight.c +0 -0
index 8f868f845350..f323a667dc2d 100644

drivers/platform/x86/dell/dell-uart-backlight.c static int dell_uart_bl_serdev_probe(struct · line 311

Quoted 8 lines
drivers/platform/x86/dell/dell-uart-backlight.c +1 -1
@@ -305,7 +305,7 @@ static int dell_uart_bl_serdev_probe(struct
 serdev_device *serdev)
  	dev_dbg(dev, "Firmware version: %.*s\n", resp[RESP_LEN] - 3, resp +
 RESP_DATA);
    	/* Initialize bl_power to a known value */
-	ret = dell_uart_set_bl_power(dell_bl, FB_BLANK_UNBLANK);
+	ret = dell_uart_set_bl_power(dell_bl, BACKLIGHT_POWER_ON);
  	if (ret)
  		return ret;

Hi Thomas,

Quoted 5 lines
Quoted 2 lines

Do you expect this entire series to go in this cycle through some other tree than pdx86? If not, I'll take this through pdx86 tree in this cycle.

I don't know when the series will get merged, but it might still take a bit. Please take this patch through your tree. Good to have it off the list.

Thanks.

Applied it to the review-ilpo-next branch.

Signature · 1 line
 i.
author maintainer
#5 lore raw

PATCH v2 2/15 drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32(). Avoids dependency on backlight header to include it.

---
 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1 -0
index ea241c89593b..930948cb615f 100644
@@ -16,6 +16,7 @@
 #include <linux/export.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/property.h>
 #include <linux/regulator/consumer.h>
 #include <linux/media-bus-format.h>
Signature · 1 line
2.50.0
Reviewed-by on v2 2/15
#6 lore raw

Re: [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>

Quoted 4 lines · Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32(). Avoids dependency on backlight header to include it.

Quoted 19 lines
---
 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1 -0
index ea241c89593b..930948cb615f 100644
@@ -16,6 +16,7 @@
 #include <linux/export.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/property.h>
 #include <linux/regulator/consumer.h>
 #include <linux/media-bus-format.h>
Signature · 1 line
2.50.0
Signature · 3 lines
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#7 lore raw

Re: [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>

In reply to Thomas Zimmermann

Hi,

Quoted 2 lines · Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32(). Avoids dependency on backlight header to include it.

device_property_*() is from <linux/property.h>, which is already included in the following line...

Greetings,

-- Sebastian

Quoted 21 lines
---
 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1 -0
index ea241c89593b..930948cb615f 100644
@@ -16,6 +16,7 @@
 #include <linux/export.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/property.h>
 #include <linux/regulator/consumer.h>
 #include <linux/media-bus-format.h>
Signature · 1 line
2.50.0
author maintainer
#8 lore raw

Re: [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>

Hi

Am 16.07.25 um 01:43 schrieb Sebastian Reichel:

Quoted 7 lines

Hi,

Quoted 2 lines · Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32(). Avoids dependency on backlight header to include it.

device_property_*() is from <linux/property.h>, which is already included in the following line...

Oh, that has been fixed already by commit d1a1807bae39 ("drm/panel: panel-samsung-s6e63m0: Include <linux/property.h>") from last October. Some of the patches in this series have been written a while ago. The one here is from Feb 2024. I'll double check the others, there might be similar cases. Thanks for reviewing.

Best regards
Thomas

Quoted 25 lines

Greetings,

-- Sebastian

Quoted 20 lines
---
  drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1 -0
index ea241c89593b..930948cb615f 100644
@@ -16,6 +16,7 @@
  #include <linux/export.h>
  #include <linux/gpio/consumer.h>
  #include <linux/module.h>
+#include <linux/of.h>
  #include <linux/property.h>
  #include <linux/regulator/consumer.h>
  #include <linux/media-bus-format.h>
Signature · 1 line
2.50.0
Signature · 7 lines
--
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)
author maintainer
#9 lore raw

PATCH v2 3/15 drm/panel: panel-samsung-s6e88a0-ams427ap24: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_bool(). Avoids dependency on backlight header to include it.

---
 drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c +1 -0
index e91f50662997..b6d04f8ad561 100644
@@ -8,6 +8,7 @@
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/regulator/consumer.h>
 
 #include <video/mipi_display.h>
Signature · 1 line
2.50.0
author maintainer
#10 lore raw

PATCH v2 4/15 drm/panel: panel-summit: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32() and struct of_device_id. Avoids dependency on backlight header to include it.

---
 drivers/gpu/drm/panel/panel-summit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-summit.c +1 -0
index 4854437e2899..02aa1ec287d6 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 #include <linux/backlight.h>
+#include <linux/of.h>
 #include <drm/drm_device.h>
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_mode.h>
Signature · 1 line
2.50.0
#11 lore raw

Re: [PATCH v2 04/15] drm/panel: panel-summit: Include <linux/of.h>

Quoted 4 lines · Thomas Zimmermann

Include <linux/of.h> to declare device_property_read_u32() and struct of_device_id. Avoids dependency on backlight header to include it.

Neither of those come from of.h.

Quoted 21 lines
---
 drivers/gpu/drm/panel/panel-summit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-summit.c +1 -1
index 4854437e2899..02aa1ec287d6 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 #include <linux/backlight.h>
+#include <linux/of.h>
 #include <drm/drm_device.h>
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_mode.h>
--

2.50.0

author maintainer
#12 lore raw

PATCH v2 5/15 fbcon: Add necessary include statements and forward declarations

In reply to Thomas Zimmermann

Make the header self contained for including.

---
 include/linux/fbcon.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/fbcon.h +7 -0
index 2382dec6d6ab..81f0e698acbf 100644
@@ -1,6 +1,13 @@
 #ifndef _LINUX_FBCON_H
 #define _LINUX_FBCON_H
 
+#include <linux/compiler_types.h>
+
+struct fb_blit_caps;
+struct fb_info;
+struct fb_var_screeninfo;
+struct fb_videomode;
+
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE
 void __init fb_console_init(void);
 void __exit fb_console_exit(void);
Signature · 1 line
2.50.0
Reviewed-by on v2 5/15
#13 lore raw

Re: [PATCH v2 05/15] fbcon: Add necessary include statements and forward declarations

Quoted 3 lines · Thomas Zimmermann

Make the header self contained for including.

Quoted 25 lines
---
 include/linux/fbcon.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/fbcon.h +7 -0
index 2382dec6d6ab..81f0e698acbf 100644
@@ -1,6 +1,13 @@
 #ifndef _LINUX_FBCON_H
 #define _LINUX_FBCON_H
 
+#include <linux/compiler_types.h>
+
+struct fb_blit_caps;
+struct fb_info;
+struct fb_var_screeninfo;
+struct fb_videomode;
+
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE
 void __init fb_console_init(void);
 void __exit fb_console_exit(void);
Signature · 1 line
2.50.0
Signature · 3 lines
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
author maintainer
#14 lore raw

PATCH v2 6/15 backlight: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to avoid dependency on backlight header to include it.

---
 drivers/video/backlight/backlight.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/backlight.c +1 -0
index 9dc93c5e480b..1e9b7e85d99a 100644
@@ -16,6 +16,7 @@
 #include <linux/ctype.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
Signature · 1 line
2.50.0
author maintainer
#16 lore raw

PATCH v2 7/15 backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>

In reply to Thomas Zimmermann

Include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/apple_dwi_bl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/apple_dwi_bl.c +1 -0
index 93bd744972d6..ed8bf13d3f51 100644
@@ -9,6 +9,7 @@
 #include <linux/bitfield.h>
 #include <linux/device.h>
 #include <linux/io.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
Signature · 1 line
2.50.0
author maintainer
#18 lore raw

PATCH v2 8/15 backlight: as3711_bl: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare various OF helpers. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/as3711_bl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/as3711_bl.c +1 -0
index 9f89eb19894e..753160bbc3e7 100644
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/mfd/as3711.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
Signature · 1 line
2.50.0
author maintainer
#20 lore raw

PATCH v2 9/15 backlight: da9052_bl: Include <linux/mod_devicetable.h>

In reply to Thomas Zimmermann

Include <linux/mod_devicetable.h> to declare struct platform_device_id. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/da9052_bl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/da9052_bl.c +1 -0
index f41523d78121..2493138febfa 100644
@@ -9,6 +9,7 @@
 
 #include <linux/backlight.h>
 #include <linux/delay.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
Signature · 1 line
2.50.0
author maintainer
#22 lore raw

PATCH v2 10/15 backlight: jornada720: Include <linux/io.h>

In reply to Thomas Zimmermann

Include <linux/io.h> to declare IOMEM(). Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/jornada720_bl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/jornada720_bl.c +1 -0
index e28d2c071798..bbb65fdaddc7 100644
@@ -7,6 +7,7 @@
 
 #include <linux/backlight.h>
 #include <linux/device.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
Signature · 1 line
2.50.0
author maintainer
#24 lore raw

PATCH v2 11/15 backlight: ktd2801: Include <linux/mod_devicetable.h>

In reply to Thomas Zimmermann

Include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/ktd2801-backlight.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/ktd2801-backlight.c +1 -0
index 0489b0615ceb..17eac1b3bce4 100644
@@ -6,6 +6,7 @@
 #include <linux/backlight.h>
 #include <linux/gpio/consumer.h>
 #include <linux/leds-expresswire.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
 
Signature · 1 line
2.50.0
author maintainer
#26 lore raw

PATCH v2 12/15 backlight: led_bl: Include <linux/of.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare struct of_count_phandle_with_args(). Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/led_bl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/led_bl.c +1 -0
index d2db157b2c29..44aac5fb2663 100644
@@ -9,6 +9,7 @@
 #include <linux/backlight.h>
 #include <linux/leds.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 
 struct led_bl_data {
Signature · 1 line
2.50.0
author maintainer
#28 lore raw

PATCH v2 13/15 backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>

In reply to Thomas Zimmermann

Include <linux/of.h> to declare struct device_node and include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/rave-sp-backlight.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/video/backlight/rave-sp-backlight.c +2 -0
index e708a060a6e4..bfe01b9b9174 100644
@@ -9,8 +9,10 @@
 
 #include <linux/backlight.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/mfd/rave-sp.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 
 #define	RAVE_SP_BACKLIGHT_LCD_EN	BIT(7)
Signature · 1 line
2.50.0
#29 lore raw

Re: [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>

Quoted 4 lines · Thomas Zimmermann

Include <linux/of.h> to declare struct device_node and include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

struct device_node should be opaque...

        /*
         * If there is a phandle pointing to the device node we can
         * assume that another device will manage the status changes.
         * If not we make sure the backlight is in a consistent state.
         */
        if (!dev->of_node->phandle)
                backlight_update_status(bd);

Well, that is ugly. IMO, we should just drop the check. A DT built with "-@" option will have phandle set, so that's not a reliable test.

Rob

author maintainer
#30 lore raw

Re: [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>

Hi

Am 15.07.25 um 15:34 schrieb Rob Herring:

Quoted 14 lines · Thomas Zimmermann
Quoted 3 lines

Include <linux/of.h> to declare struct device_node and include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

struct device_node should be opaque...

         /*
          * If there is a phandle pointing to the device node we can
          * assume that another device will manage the status changes.
          * If not we make sure the backlight is in a consistent state.
          */
         if (!dev->of_node->phandle)
                 backlight_update_status(bd);
Quoted 2 lines

Well, that is ugly. IMO, we should just drop the check. A DT built with "-@" option will have phandle set, so that's not a reliable test.

Not that I disagree, but fixing it is out of scope for this series.

Best regards
Thomas

Quoted 2 lines

Rob

Signature · 7 lines
--
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)
maintainer Reviewed-by
#31 lore raw

Re: [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>

Quoted 17 lines · Thomas Zimmermann

Hi

Am 15.07.25 um 15:34 schrieb Rob Herring:

Quoted 14 lines · Thomas Zimmermann
Quoted 3 lines

Include <linux/of.h> to declare struct device_node and include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

struct device_node should be opaque...

         /*
          * If there is a phandle pointing to the device node we can
          * assume that another device will manage the status changes.
          * If not we make sure the backlight is in a consistent state.
          */
         if (!dev->of_node->phandle)
                 backlight_update_status(bd);
Quoted 4 lines
Quoted 2 lines

Well, that is ugly. IMO, we should just drop the check. A DT built with "-@" option will have phandle set, so that's not a reliable test.

Not that I disagree, but fixing it is out of scope for this series.

This pattern appears in several places. It is used to guess whether the initial state of the backlight should be on or off (which avoids flickering artefacts during boot).

You won't get much argument from me about the ugliness either. However this patch makes the presence of this logic more obvious rather than less. On that basis I view it as moving in the right direction rather than the wrong one and therefore:

Daniel.

author maintainer
#32 lore raw

PATCH v2 14/15 backlight: rt4831: Include <linux/mod_devicetable.h>

In reply to Thomas Zimmermann

Include <linux/mod_devicetable.h> to declare struct of_device_id. Avoids dependency on backlight header to include it.

---
 drivers/video/backlight/rt4831-backlight.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/backlight/rt4831-backlight.c +1 -0
index 7ead75929a43..26214519bfce 100644
@@ -4,6 +4,7 @@
 #include <linux/backlight.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
Signature · 1 line
2.50.0
author maintainer
#34 lore raw

PATCH v2 15/15 backlight: Do not include <linux/fb.h> in header file

In reply to Thomas Zimmermann

The backlight interfaces don't require anything from <linux/fb.h>, so don't include it.

---
 include/linux/backlight.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/backlight.h +0 -1
index 10e626db7eee..f29a9ef1052e 100644
@@ -10,7 +10,6 @@
 #define _LINUX_BACKLIGHT_H
 
 #include <linux/device.h>
-#include <linux/fb.h>
 #include <linux/mutex.h>
 #include <linux/types.h>
 
Signature · 1 line
2.50.0
Reviewed-by on v2 15/15
#35 lore raw
Quoted 4 lines · Thomas Zimmermann

The backlight interfaces don't require anything from <linux/fb.h>, so don't include it.

I like this very much.

I guess also my Acked-by for merging the entire pile through the backlight subsystem, that's probably the easiest path to land this all.

Cheers, Sima

Quoted 19 lines
---
 include/linux/backlight.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/backlight.h +0 -1
index 10e626db7eee..f29a9ef1052e 100644
@@ -10,7 +10,6 @@
 #define _LINUX_BACKLIGHT_H
 
 #include <linux/device.h>
-#include <linux/fb.h>
 #include <linux/mutex.h>
 #include <linux/types.h>
 
Signature · 1 line
2.50.0
Signature · 3 lines
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
author maintainer
#36 lore raw

Hi

Am 15.07.25 um 15:22 schrieb Simona Vetter:

Quoted 8 lines · Thomas Zimmermann
Quoted 4 lines

The backlight interfaces don't require anything from <linux/fb.h>, so don't include it.

I like this very much.

Thanks for reviewing. backlight.h is also the last major header file the includes <linux/fb.h>. Not including it here will free many other files from the dependency.

Quoted 3 lines

I guess also my Acked-by for merging the entire pile through the backlight subsystem, that's probably the easiest path to land this all.

Yeah, that was the plan.

Best regards
Thomas

Quoted 22 lines

Cheers, Sima

Quoted 19 lines
---
  include/linux/backlight.h | 1 -
  1 file changed, 1 deletion(-)
include/linux/backlight.h +0 -1
index 10e626db7eee..f29a9ef1052e 100644
@@ -10,7 +10,6 @@
  #define _LINUX_BACKLIGHT_H
 
  #include <linux/device.h>
-#include <linux/fb.h>
  #include <linux/mutex.h>
  #include <linux/types.h>
 
Signature · 1 line
2.50.0
Signature · 7 lines
--
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)
author maintainer
#38 lore raw

Hi

Am 15.09.25 um 17:02 schrieb Daniel Thompson:

Quoted 6 lines · Thomas Zimmermann
Quoted 4 lines

The backlight interfaces don't require anything from <linux/fb.h>, so don't include it.

Thanks for reviewing. I've meanwhile merged the patches to non-backlight drivers via DRM trees. They will be in v6.18. So a rebase of this series will then be backlight-only. I intent to send this as soon as v6.18-rc1 is out.

Best regards
Thomas

Quoted 3 lines

Daniel.

Signature · 7 lines
--
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)
maintainer Applied
#39 lore raw

Re: (subset) [PATCH v2 00/15] backlight: Do not include <linux/fb.h> in header file

In reply to Thomas Zimmermann
Quoted 9 lines · Thomas Zimmermann

Remove the final dependencies on fbdev from the backlight subsystem. This is really just the include of <linux/fb.h> in backlight, but it has some fallout in other code.

Patches 1 to 14 fix all the implicit includes that come from fb.h throughout the kernel. It's all trivial, but touches various drivers. Maintainers are in CC. Patch 15 fixes the backlight header.

[...]

Applied, thanks!

[06/15] backlight: Include <linux/of.h>

        commit: b12224c28d84d054dfb680c05cda61d1e2584bf5
[07/15] backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>
        commit: 945e411acde3800234d506f4304203a9b11890f8
[08/15] backlight: as3711_bl: Include <linux/of.h>
        commit: 6789cd935a57464deaacdd14c84bc026aa228e72
[09/15] backlight: da9052_bl: Include <linux/mod_devicetable.h>
        commit: e2e76f67bdbbc7b8df608e3dd1028059d838871e
[10/15] backlight: jornada720: Include <linux/io.h>
        commit: ce4bb1a2f1cbcd5f6471f74ee5c7e1443a4cfd84
[11/15] backlight: ktd2801: Include <linux/mod_devicetable.h>
        commit: 5f60004f152b432c6ae5dbacc172adc1fa215825
[12/15] backlight: led_bl: Include <linux/of.h>
        commit: b38ed7c05a35f3a029c2fc5e43a94aa81e2ac843
[13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>
        commit: 246da2b48e2ce973db255fc4b6faf42f73c03114
[14/15] backlight: rt4831: Include <linux/mod_devicetable.h>
        commit: ba3b29a639fe5173033914db6ee58d8d9bb86aba
[15/15] backlight: Do not include <linux/fb.h> in header file
        commit: 9f218f9bb9d274b9d5d48a4c95e1b199141fc1f2

--
Lee Jones [李琼斯]

maintainer
#40 lore raw

Re: (subset) [PATCH v2 00/15] backlight: Do not include <linux/fb.h> in header file

Quoted 32 lines · Lee Jones
Quoted 9 lines · Thomas Zimmermann

Remove the final dependencies on fbdev from the backlight subsystem. This is really just the include of <linux/fb.h> in backlight, but it has some fallout in other code.

Patches 1 to 14 fix all the implicit includes that come from fb.h throughout the kernel. It's all trivial, but touches various drivers. Maintainers are in CC. Patch 15 fixes the backlight header.

[...]

Applied, thanks!

[06/15] backlight: Include <linux/of.h>

        commit: b12224c28d84d054dfb680c05cda61d1e2584bf5
[07/15] backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>
        commit: 945e411acde3800234d506f4304203a9b11890f8
[08/15] backlight: as3711_bl: Include <linux/of.h>
        commit: 6789cd935a57464deaacdd14c84bc026aa228e72
[09/15] backlight: da9052_bl: Include <linux/mod_devicetable.h>
        commit: e2e76f67bdbbc7b8df608e3dd1028059d838871e
[10/15] backlight: jornada720: Include <linux/io.h>
        commit: ce4bb1a2f1cbcd5f6471f74ee5c7e1443a4cfd84
[11/15] backlight: ktd2801: Include <linux/mod_devicetable.h>
        commit: 5f60004f152b432c6ae5dbacc172adc1fa215825
[12/15] backlight: led_bl: Include <linux/of.h>
        commit: b38ed7c05a35f3a029c2fc5e43a94aa81e2ac843
[13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>
        commit: 246da2b48e2ce973db255fc4b6faf42f73c03114
[14/15] backlight: rt4831: Include <linux/mod_devicetable.h>
        commit: ba3b29a639fe5173033914db6ee58d8d9bb86aba
Quoted 2 lines

[15/15] backlight: Do not include <linux/fb.h> in header file

        commit: 9f218f9bb9d274b9d5d48a4c95e1b199141fc1f2

I have removed this commit from Backlight, since it was causing too many issues. Please resubmit it once the merge-window is closed.

Signature · 1 line
Lee Jones [李琼斯]