Skip to content

Commit 8fc3806

Browse files
author
Thomas Zimmermann
committed
fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter only controls backlight support within fbdev core code and data structures. Make fbdev drivers depend on BACKLIGHT_CLASS_DEVICE and let users select it explicitly. Fixes warnings about recursive dependencies, such as error: recursive dependency detected! symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT symbol FB_BACKLIGHT is selected by FB_SH_MOBILE_LCDC symbol FB_SH_MOBILE_LCDC depends on FB_DEVICE symbol FB_DEVICE depends on FB_CORE symbol FB_CORE is selected by DRM_GEM_DMA_HELPER symbol DRM_GEM_DMA_HELPER is selected by DRM_PANEL_ILITEK_ILI9341 symbol DRM_PANEL_ILITEK_ILI9341 depends on BACKLIGHT_CLASS_DEVICE BACKLIGHT_CLASS_DEVICE is user-selectable, so making drivers adapt to it is the correct approach in any case. For most drivers, backlight support is also configurable separately. v3: - Select BACKLIGHT_CLASS_DEVICE in PowerMac defconfigs (Christophe) - Fix PMAC_BACKLIGHT module dependency corner cases (Christophe) v2: - s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge) - Fix fbdev driver-dependency corner case (Arnd) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9398332 commit 8fc3806

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

arch/powerpc/configs/pmac32_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ CONFIG_FB_ATY=y
208208
CONFIG_FB_ATY_CT=y
209209
CONFIG_FB_ATY_GX=y
210210
CONFIG_FB_3DFX=y
211+
CONFIG_BACKLIGHT_CLASS_DEVICE=y
211212
# CONFIG_VGA_CONSOLE is not set
212213
CONFIG_FRAMEBUFFER_CONSOLE=y
213214
CONFIG_LOGO=y

arch/powerpc/configs/ppc6xx_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ CONFIG_FB_TRIDENT=m
716716
CONFIG_FB_SM501=m
717717
CONFIG_FB_IBM_GXT4500=y
718718
CONFIG_LCD_PLATFORM=m
719+
CONFIG_BACKLIGHT_CLASS_DEVICE=y
719720
CONFIG_FRAMEBUFFER_CONSOLE=y
720721
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
721722
CONFIG_LOGO=y

drivers/auxdisplay/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ config IMG_ASCII_LCD
489489

490490
config HT16K33
491491
tristate "Holtek Ht16K33 LED controller with keyscan"
492-
depends on FB && I2C && INPUT
492+
depends on FB && I2C && INPUT && BACKLIGHT_CLASS_DEVICE
493493
select FB_SYSMEM_HELPERS
494494
select INPUT_MATRIXKMAP
495495
select FB_BACKLIGHT

drivers/macintosh/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ config PMAC_MEDIABAY
120120
config PMAC_BACKLIGHT
121121
bool "Backlight control for LCD screens"
122122
depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64)
123+
depends on BACKLIGHT_CLASS_DEVICE=y
123124
select FB_BACKLIGHT
124125
help
125126
Say Y here to enable Macintosh specific extensions of the generic

drivers/staging/fbtft/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ menuconfig FB_TFT
33
tristate "Support for small TFT LCD display modules"
44
depends on FB && SPI
55
depends on FB_DEVICE
6+
depends on BACKLIGHT_CLASS_DEVICE
67
depends on GPIOLIB || COMPILE_TEST
78
select FB_BACKLIGHT
89
select FB_SYSMEM_HELPERS_DEFERRED

drivers/video/fbdev/Kconfig

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ config FB_S1D13XXX
649649
config FB_ATMEL
650650
tristate "AT91 LCD Controller support"
651651
depends on FB && OF && HAVE_CLK && HAS_IOMEM
652+
depends on BACKLIGHT_CLASS_DEVICE
652653
depends on HAVE_FB_ATMEL || COMPILE_TEST
653654
select FB_BACKLIGHT
654655
select FB_IOMEM_HELPERS
@@ -660,7 +661,6 @@ config FB_ATMEL
660661
config FB_NVIDIA
661662
tristate "nVidia Framebuffer Support"
662663
depends on FB && PCI
663-
select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
664664
select FB_CFB_FILLRECT
665665
select FB_CFB_COPYAREA
666666
select FB_CFB_IMAGEBLIT
@@ -700,14 +700,15 @@ config FB_NVIDIA_DEBUG
700700
config FB_NVIDIA_BACKLIGHT
701701
bool "Support for backlight control"
702702
depends on FB_NVIDIA
703+
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA
704+
select FB_BACKLIGHT
703705
default y
704706
help
705707
Say Y here if you want to control the backlight of your display.
706708

707709
config FB_RIVA
708710
tristate "nVidia Riva support"
709711
depends on FB && PCI
710-
select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
711712
select FB_CFB_FILLRECT
712713
select FB_CFB_COPYAREA
713714
select FB_CFB_IMAGEBLIT
@@ -747,6 +748,8 @@ config FB_RIVA_DEBUG
747748
config FB_RIVA_BACKLIGHT
748749
bool "Support for backlight control"
749750
depends on FB_RIVA
751+
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA
752+
select FB_BACKLIGHT
750753
default y
751754
help
752755
Say Y here if you want to control the backlight of your display.
@@ -934,7 +937,6 @@ config FB_MATROX_MAVEN
934937
config FB_RADEON
935938
tristate "ATI Radeon display support"
936939
depends on FB && PCI
937-
select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
938940
select FB_CFB_FILLRECT
939941
select FB_CFB_COPYAREA
940942
select FB_CFB_IMAGEBLIT
@@ -960,6 +962,8 @@ config FB_RADEON_I2C
960962
config FB_RADEON_BACKLIGHT
961963
bool "Support for backlight control"
962964
depends on FB_RADEON
965+
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RADEON
966+
select FB_BACKLIGHT
963967
default y
964968
help
965969
Say Y here if you want to control the backlight of your display.
@@ -975,7 +979,6 @@ config FB_RADEON_DEBUG
975979
config FB_ATY128
976980
tristate "ATI Rage128 display support"
977981
depends on FB && PCI
978-
select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
979982
select FB_IOMEM_HELPERS
980983
select FB_MACMODES if PPC_PMAC
981984
help
@@ -989,6 +992,8 @@ config FB_ATY128
989992
config FB_ATY128_BACKLIGHT
990993
bool "Support for backlight control"
991994
depends on FB_ATY128
995+
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY128
996+
select FB_BACKLIGHT
992997
default y
993998
help
994999
Say Y here if you want to control the backlight of your display.
@@ -999,7 +1004,6 @@ config FB_ATY
9991004
select FB_CFB_FILLRECT
10001005
select FB_CFB_COPYAREA
10011006
select FB_CFB_IMAGEBLIT
1002-
select FB_BACKLIGHT if FB_ATY_BACKLIGHT
10031007
select FB_IOMEM_FOPS
10041008
select FB_MACMODES if PPC
10051009
select FB_ATY_CT if SPARC64 && PCI
@@ -1040,6 +1044,8 @@ config FB_ATY_GX
10401044
config FB_ATY_BACKLIGHT
10411045
bool "Support for backlight control"
10421046
depends on FB_ATY
1047+
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY
1048+
select FB_BACKLIGHT
10431049
default y
10441050
help
10451051
Say Y here if you want to control the backlight of your display.
@@ -1528,6 +1534,7 @@ config FB_SH_MOBILE_LCDC
15281534
depends on FB && HAVE_CLK && HAS_IOMEM
15291535
depends on SUPERH || COMPILE_TEST
15301536
depends on FB_DEVICE
1537+
depends on BACKLIGHT_CLASS_DEVICE
15311538
select FB_BACKLIGHT
15321539
select FB_DEFERRED_IO
15331540
select FB_DMAMEM_HELPERS
@@ -1793,6 +1800,7 @@ config FB_SSD1307
17931800
tristate "Solomon SSD1307 framebuffer support"
17941801
depends on FB && I2C
17951802
depends on GPIOLIB || COMPILE_TEST
1803+
depends on BACKLIGHT_CLASS_DEVICE
17961804
select FB_BACKLIGHT
17971805
select FB_SYSMEM_HELPERS_DEFERRED
17981806
help

drivers/video/fbdev/core/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ config FB_SYSMEM_HELPERS_DEFERRED
183183
select FB_SYSMEM_HELPERS
184184

185185
config FB_BACKLIGHT
186-
tristate
186+
bool
187187
depends on FB
188-
select BACKLIGHT_CLASS_DEVICE
189188

190189
config FB_MODE_HELPERS
191190
bool "Enable Video Mode Handling Helpers"

0 commit comments

Comments
 (0)