Skip to contentSkip to conversation

fb: via: turn gpiolib and i2c selects into dependencies

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 28, 2015 – Jan 30, 2015 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fb: via: turn gpiolib and i2c selects into dependencies

Device driver should not directly select subsystems. In this case we get build warnings like

warning: (ARCH_REQUIRE_GPIOLIB && PINCTRL_AT91 && PINCTRL_NOMADIK && MFD_TC6393XB && FB_VIA) selects GPIOLIB which has unmet direct dependencies (ARCH_WANT_OPTIONAL_GPIOLIB || ARCH_REQUIRE_GPIOLIB)

which we can avoid using the normal 'depends on' statement.

Also, this patch makes it possible for DRM drivers to have a dependency on GPIOLIB without getting circular Kconfig dependencies.

drivers/video/fbdev/Kconfig +1 -3
index f2c3fb7d0399..b3dd417b4719 100644
@@ -1530,13 +1530,11 @@ config FB_SIS_315
 
 config FB_VIA
        tristate "VIA UniChrome (Pro) and Chrome9 display support"
-       depends on FB && PCI && X86
+       depends on FB && PCI && X86 && GPIOLIB && I2C
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select I2C_ALGOBIT
-       select I2C
-       select GPIOLIB
        help
 	  This is the frame buffer device driver for Graphics chips of VIA
 	  UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/
#1 lore raw
Quoted 22 lines · Arnd Bergmann

Device driver should not directly select subsystems. In this case we get build warnings like

warning: (ARCH_REQUIRE_GPIOLIB && PINCTRL_AT91 && PINCTRL_NOMADIK && MFD_TC6393XB && FB_VIA) selects GPIOLIB which has unmet direct dependencies (ARCH_WANT_OPTIONAL_GPIOLIB || ARCH_REQUIRE_GPIOLIB)

which we can avoid using the normal 'depends on' statement.

Also, this patch makes it possible for DRM drivers to have a dependency on GPIOLIB without getting circular Kconfig dependencies.

drivers/video/fbdev/Kconfig +0 -1
index f2c3fb7d0399..b3dd417b4719 100644
@@ -1530,13 +1530,11 @@ config FB_SIS_315
 
 config FB_VIA
        tristate "VIA UniChrome (Pro) and Chrome9 display support"
-       depends on FB && PCI && X86

drivers/video/fbdev/Kconfig config FB_SIS_315 · line 1540

Quoted 10 lines
drivers/video/fbdev/Kconfig +1 -2
+       depends on FB && PCI && X86 && GPIOLIB && I2C
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select I2C_ALGOBIT
-       select I2C
-       select GPIOLIB
        help
 	  This is the frame buffer device driver for Graphics chips of VIA
 	  UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/

Thanks, queued for 3.20.

Tomi