backlight: Do not include <linux/fb.h> in header file
Subsystems (10)
Thomas Zimmermann
maintainerv2 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
Thomas Zimmermann
maintainerPATCH 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
@@ -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
Ilpo Järvinen
maintainerRe: [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_UNBLANKwithBACKLIGHT_POWER_ON.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Hans de Goede <[email protected]>Acked-by Ilpo Järvinen <[email protected]>--- 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
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.
Thomas Zimmermann
maintainerRe: [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_UNBLANKwithBACKLIGHT_POWER_ON.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Hans de Goede <[email protected]>Acked-by Ilpo Järvinen <[email protected]>--- 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
-0drivers/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)
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_UNBLANKwithBACKLIGHT_POWER_ON.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Hans de Goede <[email protected]>Acked-by Ilpo Järvinen <[email protected]>--- 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
-0drivers/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.
Thomas Zimmermann
maintainerPATCH v2 2/15 drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> to declaredevice_property_read_u32(). Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
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@@ -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
Re: [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h>
In reply to Thomas ZimmermannHi,
Quoted 2 lines · Thomas Zimmermann
Include <
linux/of.h> to declaredevice_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
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1
-0@@ -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
Thomas Zimmermann
maintainerRe: [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 declaredevice_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
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1
-0@@ -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)
Thomas Zimmermann
maintainerPATCH v2 3/15 drm/panel: panel-samsung-s6e88a0-ams427ap24: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Thomas Zimmermann
maintainerPATCH v2 4/15 drm/panel: panel-summit: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 04/15] drm/panel: panel-summit: Include <linux/of.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> to declaredevice_property_read_u32()and structof_device_id. Avoids dependency on backlight header to include it.
Neither of those come from of.h.
Quoted 21 lines
Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Janne Grunau <[email protected]>--- drivers/gpu/drm/panel/panel-summit.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/panel/panel-summit.c +1
-1@@ -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
Thomas Zimmermann
maintainerPATCH v2 5/15 fbcon: Add necessary include statements and forward declarations
In reply to Thomas ZimmermannMake the header self contained for including.
--- include/linux/fbcon.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/linux/fbcon.h +7 -0
@@ -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
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.
Signed-off-by Thomas Zimmermann <[email protected]>
Quoted 25 lines
--- include/linux/fbcon.h | 7 +++++++ 1 file changed, 7 insertions(+)include/linux/fbcon.h +7
-0@@ -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
Thomas Zimmermann
maintainerPATCH v2 6/15 backlight: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 06/15] backlight: Include <linux/of.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> to avoid dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Thomas Zimmermann
maintainerPATCH v2 7/15 backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 07/15] backlight: apple_dwi_bl: Include <linux/mod_devicetable.h>
Quoted 5 lines · Thomas Zimmermann
Include <
linux/mod_devicetable.h> to declare structof_device_id. Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Nick Chan <[email protected]>
Thomas Zimmermann
maintainerPATCH v2 8/15 backlight: as3711_bl: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 08/15] backlight: as3711_bl: Include <linux/of.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> to declare various OF helpers. Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 9/15 backlight: da9052_bl: Include <linux/mod_devicetable.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 09/15] backlight: da9052_bl: Include <linux/mod_devicetable.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/mod_devicetable.h> to declare structplatform_device_id. Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 10/15 backlight: jornada720: Include <linux/io.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 10/15] backlight: jornada720: Include <linux/io.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/io.h> to declareIOMEM(). Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 11/15 backlight: ktd2801: Include <linux/mod_devicetable.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 11/15] backlight: ktd2801: Include <linux/mod_devicetable.h>
Quoted 5 lines · Thomas Zimmermann
Include <
linux/mod_devicetable.h> to declare structof_device_id. Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Nick Chan <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 12/15 backlight: led_bl: Include <linux/of.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 12/15] backlight: led_bl: Include <linux/of.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> to declare structof_count_phandle_with_args(). Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 13/15 backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
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 structdevice_nodeand include <linux/mod_devicetable.h> to declare structof_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
Thomas Zimmermann
maintainerRe: [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 structdevice_nodeand include <linux/mod_devicetable.h> to declare structof_device_id. Avoids dependency on backlight header to include it.struct
device_nodeshould 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)
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 structdevice_nodeand include <linux/mod_devicetable.h> to declare structof_device_id. Avoids dependency on backlight header to include it.struct
device_nodeshould 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.
Thomas Zimmermann
maintainerPATCH v2 14/15 backlight: rt4831: Include <linux/mod_devicetable.h>
In reply to Thomas ZimmermannInclude <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
@@ -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
Re: [PATCH v2 14/15] backlight: rt4831: Include <linux/mod_devicetable.h>
Quoted 4 lines · Thomas Zimmermann
Include <
linux/mod_devicetable.h> to declare structof_device_id. Avoids dependency on backlight header to include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerPATCH v2 15/15 backlight: Do not include <linux/fb.h> in header file
In reply to Thomas ZimmermannThe 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
@@ -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
Quoted 4 lines · Thomas Zimmermann
The backlight interfaces don't require anything from <
linux/fb.h>, so don't include it.Signed-off-by Thomas Zimmermann <[email protected]>
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@@ -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
Thomas Zimmermann
maintainerHi
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.Signed-off-by Thomas Zimmermann <[email protected]>I like this very much.
Reviewed-by Simona Vetter <[email protected]>
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@@ -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)
Quoted 4 lines · Thomas Zimmermann
The backlight interfaces don't require anything from <
linux/fb.h>, so don't include it.Signed-off-by Thomas Zimmermann <[email protected]>
Daniel.
Thomas Zimmermann
maintainerHi
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.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Daniel Thompson (RISCstar) <[email protected]>
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)
Re: (subset) [PATCH v2 00/15] backlight: Do not include <linux/fb.h> in header file
In reply to Thomas ZimmermannQuoted 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.hthroughout 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 [李琼斯]
Lee Jones
maintainerRe: (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.hthroughout 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 filecommit: 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 [李琼斯]