Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11137511rwd; Thu, 22 Jun 2023 09:09:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qWjVTTuQayytsd3ZHJAjf1qMRit0C83kPkSxC7+XBJTRKkS45aLkMbcLOEmTY38X3cQFe X-Received: by 2002:a05:6830:1101:b0:6b5:d8e7:fe9c with SMTP id w1-20020a056830110100b006b5d8e7fe9cmr4008178otq.20.1687450197731; Thu, 22 Jun 2023 09:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687450197; cv=none; d=google.com; s=arc-20160816; b=TUFBH9F3tOpqDZYkdSKSn6bjVKJsMaFdE1E5z+U5N4/emqidMMYcmJC7d9VD213XK0 2f7HmuvaTeSP7VIdOMEPi7zXd+pRznR0bOSJS6Qxuy/vfgMeC2AQ+xcWA41+kwW5YeNF BDpD9nNqnJSe8GUkrXVxrMOj+4BlBUuoC+HSOWcQHnLCPE9c8uRoSEwY4eftWeT0nBLG Jm6kzWX8ZwOSDWrlUvO24G5QeGZTDBLbUlMxsMHW8CTP0xuv5uiLx8kwyBi6rgkkUgE5 sYiYUJyS55vIglQM28f1/JlO8fBHxwpbvoYWXLOJi2CoNPkCn6p9MjpsMhbc6uiyjNzl wguw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:references:cc:to:content-language:reply-to:from :user-agent:mime-version:date:message-id:dkim-signature; bh=/TTIQo7RQLmeRtc0cFEhWudyxQbqgwfYT0QcYRBzTlw=; b=a/IgOajhDY6kY9/Dfo0FFYG4FPM5Ntq6ACXjwoiEno+dWfmdMpGXQ4oPw9EvlKtVZb Et8F9qNA2xrqfOX89VqmMzxSSda8yhXZ37l9w0duaM+UMAsS3dh+ygY0KGmeZWWsDeLa RW6MMTHCREy6Ro6dqF3WlPBy/YwDDGvDA+AiIdXMTkwDuRvLpTf8vDRCL8zcjOkzmdnZ bHphamwGQ1gQ25Gs5iKf1xq52nxKQhR4gEGyMnE0O8R/WSmodDdLuJwBLReHaC9bXKm+ e3Y5KAWwI/4ccZO/BRfCYanzTsCUWG4dnVTPr4CXpVeTSOzKl6UQQW2Evoi16WKjPBhy O2cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qwIwMaIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a63de0a000000b0054405fa924fsi6641181pgg.891.2023.06.22.09.09.36; Thu, 22 Jun 2023 09:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qwIwMaIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232272AbjFVPjM (ORCPT + 99 others); Thu, 22 Jun 2023 11:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231151AbjFVPjL (ORCPT ); Thu, 22 Jun 2023 11:39:11 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA77D193 for ; Thu, 22 Jun 2023 08:39:07 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f90b8acefdso49813455e9.1 for ; Thu, 22 Jun 2023 08:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687448346; x=1690040346; h=content-transfer-encoding:in-reply-to:subject:organization :references:cc:to:content-language:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=/TTIQo7RQLmeRtc0cFEhWudyxQbqgwfYT0QcYRBzTlw=; b=qwIwMaIGrZdH8DISKNqxbDajZkozvwFC/cGwPz/KQq72/zst4rPaPTAe+vNrDDmul9 f5dH1H7LqvoYWSokLHuVVpy87m4qo+UndpOfoOsC1DcZd0FVxlcO+cWryXMzFEIzq1tq /L41YUcuwemLWhJJJ/4I+KxWBJRjr9ro0UmRgl1PaDBZS137tcQvzul4xEqyRYWh7yvF DN9ZM/H4do8QvaluIdeaTbpuXxmN4oxms2yPAs4JwrKN0R8pC73VADjpnPi2dmdBNeFx bFfRp9IAnRsFBmY39uzsnadmr5XNaWAvHMBbzJF7TXJDs3GgAejU0O61FGJ8T2lfouEe 8UsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687448346; x=1690040346; h=content-transfer-encoding:in-reply-to:subject:organization :references:cc:to:content-language:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=/TTIQo7RQLmeRtc0cFEhWudyxQbqgwfYT0QcYRBzTlw=; b=UtlVABnf4NNGLuYsfT6fozqffZtJr/+0/N1vM2m5ddmXGX1tcrTREBKSskDH0alMBR bWKTIq0eUCSGF0CsdXv/d3x7Zf77oh979pf0CGvwMrSA4r+or2beMO2wN0WbQd0ZQgQ/ PX0kPVAYffXkYQwzJXPBn234ZM9GT0HJ8yez3CJt1EdQeE6Sd712Wjf7MOHOx/GzzXk2 uYNByvylex8U8KFmXqoZUKPQfjPqc5L45lU+ZFUHsXnOOdhB6XLbTNdI68iqRgV6BTBP j9IDm1eHeHZxh+WmmUMvj9bGAYeP0oVoe/EH9VBYzTnqsxuHKUcaqA7Xw7s8+W45eQxQ NCbw== X-Gm-Message-State: AC+VfDzvEX4BsmfLg8BvpZF5sH0A+lnc/pybQDmDG1bfCoMK7bpzxRFz eybQKx44J4PQRssYxAlzmZrkr4FWsE3MeK1XsKgvPA== X-Received: by 2002:a7b:c3d2:0:b0:3f7:a552:2ec7 with SMTP id t18-20020a7bc3d2000000b003f7a5522ec7mr13495816wmj.33.1687448346301; Thu, 22 Jun 2023 08:39:06 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:f692:a800:4794:385? ([2a01:e0a:982:cbb0:f692:a800:4794:385]) by smtp.gmail.com with ESMTPSA id l16-20020a1c7910000000b003f9bdf60b34sm4743793wme.11.2023.06.22.08.39.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jun 2023 08:39:05 -0700 (PDT) Message-ID: <9c52ce87-f69c-e69c-ec43-6b2cc3b37c4a@linaro.org> Date: Thu, 22 Jun 2023 17:39:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Content-Language: en-US To: Arnd Bergmann , Arnd Bergmann , Heikki Krogerus , Greg Kroah-Hartman , Dmitry Baryshkov Cc: Bjorn Andersson , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230622101813.3453772-1-arnd@kernel.org> <286cf2d8-2da8-7203-ee53-bf08332fa519@linaro.org> Organization: Linaro Developer Services Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_DRM dependency In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 22/06/2023 13:24, Arnd Bergmann wrote: > On Thu, Jun 22, 2023, at 12:39, Neil Armstrong wrote: >> Hi, >> >> On 22/06/2023 12:18, Arnd Bergmann wrote: >>> From: Arnd Bergmann >>> >>> This driver calls directly into DRM functions and fails to link if >>> that is disabled: >>> >>> ld.lld: error: undefined symbol: devm_drm_bridge_add >>> ld.lld: error: undefined symbol: devm_drm_of_get_bridge >>>>>> referenced by nb7vpq904m.c >>>>>> drivers/usb/typec/mux/nb7vpq904m.o:(nb7vpq904m_probe) in archive vmlinux.a >>> >>> Fixes: 88d8f3ac9c67e ("usb: typec: add support for the nb7vpq904m Type-C Linear Redriver") >>> Signed-off-by: Arnd Bergmann >>> --- >>> drivers/usb/typec/mux/Kconfig | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig >>> index 8c4d6b8fb75c3..f53ae24b6c048 100644 >>> --- a/drivers/usb/typec/mux/Kconfig >>> +++ b/drivers/usb/typec/mux/Kconfig >>> @@ -37,7 +37,7 @@ config TYPEC_MUX_INTEL_PMC >>> >>> config TYPEC_MUX_NB7VPQ904M >>> tristate "On Semiconductor NB7VPQ904M Type-C redriver driver" >>> - depends on I2C >>> + depends on I2C && DRM >>> select REGMAP_I2C >>> help >>> Say Y or M if your system has a On Semiconductor NB7VPQ904M Type-C >> >> I think it could be : >> >> + depends on DRM || DRM=n >> + select DRM_PANEL_BRIDGE if DRM > > As far as I can tell, this would only avoid the link error > against devm_drm_of_get_bridge(), but not the one against > devm_drm_bridge_add(), which is defined in drm.ko through > drivers/gpu/drm/drm_bridge.c. I'm trying to reproduce such situation, but so fail I fail. In the driver there's a guard to avoid calling into DRM functions when disabled: #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE) so I wonder which kind on config leaded to that since CONFIG_DRM_PANEL_BRIDGE is only enabled when DRM_PANEL and DRM are. Neil > > Arnd