From patchwork Mon Jan 15 16:14:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10164703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 67E78601C0 for ; Mon, 15 Jan 2018 16:14:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 528C728448 for ; Mon, 15 Jan 2018 16:14:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46A4028914; Mon, 15 Jan 2018 16:14:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FB3B28448 for ; Mon, 15 Jan 2018 16:14:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46DA389DE6; Mon, 15 Jan 2018 16:14:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F2D389DE6 for ; Mon, 15 Jan 2018 16:14:43 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MH3Pq-1eg5DH0FWs-00DqSK; Mon, 15 Jan 2018 17:14:33 +0100 From: Arnd Bergmann To: Rob Clark Subject: [PATCH 1/2] fbdev: don't select I2C directly Date: Mon, 15 Jan 2018 17:14:04 +0100 Message-Id: <20180115161431.803248-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:+akeorEEwpjvqcs8tCDMnShPHqUyAlD5s+xnfHiUFLG/H0dDByg 9bRICAj4DA3i+iOCuYvdykjGfBJmCp/LNytihU9ucE/1+x9denalWWIVP4qN9FuvnCB5BnS FNBB7oE7JQAOErBkkZthZqXpVLXVp0rhzqQQcUcT2Ss+N9NZ0gHQt2TYBWDqxm2TGH3llDt uzRpDacqMH11HTvne91KQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ojaFah+BtKs=:mVgKCE8UTTZJuOgtCUySV+ AIG/xecRLh+si6WYkputSP7MVoDkmJrFA3RTLbtIgUIslUCgALjS7L8oU1VmsAckIEgDwXWmH 05BHj7zpG3FpXzwFao4YDURZZSsba5Sq0MAA3qRoNA2nvAwsSZi74cxjpHwlsnxJWcHXWprQk HRh6ReqfFYBGfeVZNapRjuOGW6BPxfHtwmGT3hdCZgrMqJZeSSlOuHCkC3q+HASkrr8DDlnSu sDKOk3OO8AMLRoHH9zEs6Ayyq5P8TiUl69uihz88dvX/6C+j9GpZiM22Qjq5zbMIwrDa/yVQh wFF1x93tox5eFljk2Cs4LCQwqzKMnvdfdSi6XzhVWFPxb1arpSBmUJ4vHTvygnb4rqeqeYIm+ /VkClk5AoklsjoUfxh4g3TUlAoII7n4QZjZgyASjWlbbGPm54UeuOzsv6fuNKjdQQNiyD03N4 oENIoXKnhDS37Ve8MLHLTAet4G1tmFLdih+jreKrcT50ow3KKb5+euueX/ilP2t8lZqDRdySI 6MXgvlazM1ZKRT/5upBPiyMzrkwX7+puClgzXzaLErNrg1A63pdji8sCnSEafItxVftL2H4GH XeaCIiPg8KNfw7vxS9lTkze8/ykUPSctH+uXD51rj+acSNn1wV1tIhmlYpN2js6F1Ys1ePBHI ML+m2VvoQ7gukzKImPYrUassOw3e/KOofC0hnuMefPiBstCL2UDzDnXAj3w9ae8XmWKVehB4M W4HONzYNnEXcnIGQ2hyVPJXMrOYTvb8gmPQlDg== Cc: linux-fbdev@vger.kernel.org, Arnd Bergmann , Wolfram Sang , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Srinivas Kandagatla , linux-i2c@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Using a Kconfig 'select' statement for a user-visible symbol that other drivers depend on often causes circular dependencies. A new one showed up when I wanted to add an NVMEM dependency to the DRM_MSM driver: drivers/i2c/Kconfig:7:error: recursive dependency detected! drivers/i2c/Kconfig:7: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:63: symbol FB_DDC is selected by FB_CYBER2000_DDC drivers/video/fbdev/Kconfig:390: symbol FB_CYBER2000_DDC depends on FB_CYBER2000 drivers/video/fbdev/Kconfig:378: symbol FB_CYBER2000 depends on FB drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER drivers/gpu/drm/Kconfig:77: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER drivers/gpu/drm/Kconfig:71: symbol DRM_KMS_HELPER is selected by DRM_MSM drivers/gpu/drm/msm/Kconfig:2: symbol DRM_MSM depends on NVMEM drivers/nvmem/Kconfig:1: symbol NVMEM is selected by EEPROM_AT24 drivers/misc/eeprom/Kconfig:3: symbol EEPROM_AT24 depends on I2C Here, the problem is that many fbdev drivers have an i2c based interface and just 'select i2c' for that, while we also select the framebuffer subsystem indirectly from a DRM driver that now depends on i2c. This does away with the 'select' statement and instead uses 'depends on', like almost all I2C users. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/Kconfig | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 6962b4583fd7..892eb1863100 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -64,7 +64,6 @@ config FB_DDC tristate depends on FB select I2C_ALGOBIT - select I2C default n config FB_BOOT_VESA_SUPPORT @@ -390,6 +389,7 @@ config FB_CYBER2000 config FB_CYBER2000_DDC bool "DDC for CyberPro support" depends on FB_CYBER2000 + depends on I2C=y || I2C=FB_CYBER2000 select FB_DDC default y help @@ -634,7 +634,7 @@ config FB_BF537_LQ035 config FB_BFIN_7393 tristate "Blackfin ADV7393 Video encoder" depends on FB && BLACKFIN - select I2C + depends on I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -1026,6 +1026,7 @@ config FB_NVIDIA config FB_NVIDIA_I2C bool "Enable DDC Support" depends on FB_NVIDIA + depends on I2C=y || I2C=FB_NVIDIA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -1073,6 +1074,7 @@ config FB_RIVA config FB_RIVA_I2C bool "Enable DDC Support" depends on FB_RIVA + depends on I2C=y || I2C=FB_RIVA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -1102,6 +1104,7 @@ config FB_RIVA_BACKLIGHT config FB_I740 tristate "Intel740 support" depends on FB && PCI + depends on I2C select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -1155,6 +1158,7 @@ config FB_I810_GTF config FB_I810_I2C bool "Enable DDC Support" depends on FB_I810 && FB_I810_GTF + depends on I2C=y || I2C=FB_I810 select FB_DDC help @@ -1206,6 +1210,7 @@ config FB_INTEL_DEBUG config FB_INTEL_I2C bool "DDC/I2C for Intel framebuffer support" depends on FB_INTEL + depends on I2C=y || I2C=FB_INTEL select FB_DDC default y help @@ -1285,6 +1290,7 @@ config FB_MATROX_G config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX + depends on I2C select FB_DDC ---help--- This drivers creates I2C buses which are needed for accessing the @@ -1350,6 +1356,7 @@ config FB_RADEON config FB_RADEON_I2C bool "DDC/I2C for ATI Radeon support" depends on FB_RADEON + depends on I2C=y || I2C=FB_RADEON select FB_DDC default y help @@ -1460,6 +1467,7 @@ config FB_S3 config FB_S3_DDC bool "DDC for S3 support" depends on FB_S3 + depends on I2C=y || I2C=FB_S3 select FB_DDC default y help @@ -1485,6 +1493,7 @@ config FB_SAVAGE config FB_SAVAGE_I2C bool "Enable DDC2 Support" depends on FB_SAVAGE + depends on I2C=y || I2C=FB_SAVAGE select FB_DDC help This enables I2C support for S3 Savage Chipsets. This is used @@ -1629,6 +1638,7 @@ config FB_3DFX_ACCEL config FB_3DFX_I2C bool "Enable DDC/I2C support" depends on FB_3DFX + depends on I2C=y || I2C=FB_3DFX select FB_DDC default y help @@ -1669,6 +1679,7 @@ config FB_VT8623 config FB_TRIDENT tristate "Trident/CyberXXX/CyberBlade support" depends on FB && PCI + depends on I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -2299,8 +2310,8 @@ endchoice config FB_MB862XX_I2C bool "Support I2C bus on MB862XX GDC" - depends on FB_MB862XX && I2C - depends on FB_MB862XX=m || I2C=y + depends on FB_MB862XX + depends on I2C=y || I2C=FB_MB862XX default y help Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter