From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7A4DC433E1 for ; Mon, 18 May 2020 18:36:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88DBC20715 for ; Mon, 18 May 2020 18:36:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SP6KFNP8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728977AbgERSgi (ORCPT ); Mon, 18 May 2020 14:36:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728152AbgERSgg (ORCPT ); Mon, 18 May 2020 14:36:36 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EC1C061A0C for ; Mon, 18 May 2020 11:36:36 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id q8so3541990pfu.5 for ; Mon, 18 May 2020 11:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gvKKfXKVwXyHM5zyQzU2yfD82YJ/ssxteenCSL12PQo=; b=SP6KFNP8GBJH4Y0iu8AifmlsrJrIDmqF86ly0zVJjsY9edGxCLOGJgRntsHb0RHjQG gATe1S/lNrSEnPx6+nA/9Db0kPWSNByB+aLbETP0I7rvxRd5Pg5ppv5wkwn5hjz58cu/ /58rWXz8O5y2llnAhz2PnD1PepCOMtPQz0wlcWd4cCLGYB8YoMdMS4KqF902+qJ/GrWu rYOlTmXrrdAjjv2aIxMNhSrdaKjlbrB4OS5ce1/H/hEo88g4KjJQ31AE7yroPGtfE9G0 GSPSNWOTyxVLaXh8veu7K3K0s5sMenbgG1ZDSnf8416Sc5oeIX+1pRsFFZpq8ADiflTg Yiqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gvKKfXKVwXyHM5zyQzU2yfD82YJ/ssxteenCSL12PQo=; b=k0aoTP4rOfHBnpxkVahyisBdthMNgk3C+zSiQODE08onnhrK34Cc8CNXa2TdlfSAzf 9m/aI2+/SW1BAO6xzmk6QwuRDy0px6+AbpnsYhi0jSNqbXzAlIIHdUOu3aqK3kIGJGia 0lv3Vbbc972vxAF0XBtK6ZH+YyrWn7wPvkhOTCuq522ymPaKIamNOVJ5hYCp2x5sffxO MGlEvbziPC5I3XW+gcRQzMqNZldovjsjqd76rLZb5MXSuvnZUp3ow0CB4DfYcBF7+T/l CO+6as+qDyPGKgSO/EhoJX+iWhmaupWxpe/lD7OHvOYrpxJSiZO4Opzi5wvhFD4aWipp wN3g== X-Gm-Message-State: AOAM532FGCEzploMQOVscylesIrUh5wLKkFgujR2JZReWMLxtlUXutEi 8A6xYS1L0qHcjHgHwDjeblHQhw== X-Google-Smtp-Source: ABdhPJwzQPbROOk4HuXutlusmWdCXG1o7ldok+fY8PJ23k2eDMM1tiiAiGoPeKkibIa2gifPhE5rpA== X-Received: by 2002:a65:5186:: with SMTP id h6mr17090119pgq.453.1589826995952; Mon, 18 May 2020 11:36:35 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id z1sm209932pjn.43.2020.05.18.11.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 11:36:35 -0700 (PDT) Date: Mon, 18 May 2020 11:35:12 -0700 From: Bjorn Andersson To: Felipe Balbi Cc: Georgi Djakov , Matthias Kaehlcke , Sandeep Maheswaram , Andy Gross , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Stephen Boyd , Doug Anderson , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manu Gautam , Chandana Kishori Chiluveru , Viresh Kumar Subject: Re: [PATCH v7 2/4] usb: dwc3: qcom: Add interconnect support in dwc3 driver Message-ID: <20200518183512.GE2165@builder.lan> References: <1585718145-29537-1-git-send-email-sanm@codeaurora.org> <1585718145-29537-3-git-send-email-sanm@codeaurora.org> <878shu4uwk.fsf@kernel.org> <875zcy4uuj.fsf@kernel.org> <20200514171352.GP4525@google.com> <87tv0h3fpv.fsf@kernel.org> <090e48d7-7988-eea1-bf39-f6820578d354@linaro.org> <87r1vl3e42.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1vl3e42.fsf@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 14 May 23:29 PDT 2020, Felipe Balbi wrote: > > Hi, > > Georgi Djakov writes: > >>>>>> Sandeep Maheswaram writes: > >>>>>>> +static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom) > >>>>>>> +{ > >>>>>>> + struct device *dev = qcom->dev; > >>>>>>> + int ret; > >>>>>>> + > >>>>>>> + if (!device_is_bound(&qcom->dwc3->dev)) > >>>>>>> + return -EPROBE_DEFER; > >>>>>> > >>>>>> this breaks allmodconfig. I'm dropping this series from my queue for > >>>>>> this merge window. > >>>>> > >>>>> Sorry, I meant this patch ;-) > >>>> > >>>> I guess that's due to INTERCONNECT being a module. There is currently a > >>> > >>> I believe it's because of this: > >>> ERROR: modpost: "device_is_bound" [drivers/usb/dwc3/dwc3-qcom.ko] undefined! > >>> > >>>> discussion about this with Viresh and Georgi in response to another > >>>> automated build failure. Viresh suggests changing CONFIG_INTERCONNECT > >>>> from tristate to bool, which seems sensible to me given that interconnect > >>>> is a core subsystem. > >>> > >>> The problem you are talking about would arise when INTERCONNECT=m and > >>> USB_DWC3_QCOM=y and it definitely exists here and could be triggered with > >>> randconfig build. So i suggest to squash also the diff below. > >>> > >>> Thanks, > >>> Georgi > >>> > >>> ---8<--- > >>> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig > >>> index 206caa0ea1c6..6661788b1a76 100644 > >>> --- a/drivers/usb/dwc3/Kconfig > >>> +++ b/drivers/usb/dwc3/Kconfig > >>> @@ -129,6 +129,7 @@ config USB_DWC3_QCOM > >>> tristate "Qualcomm Platform" > >>> depends on ARCH_QCOM || COMPILE_TEST > >>> depends on EXTCON || !EXTCON > >>> + depends on INTERCONNECT || !INTERCONNECT > >> > >> I would prefer to see a patch adding EXPORT_SYMBOL_GPL() to device_is_bound() > > > > Agree, but just to clarify, that these are two separate issues that need to > > be fixed. The device_is_bound() is the first one and USB_DWC3_QCOM=y combined > > with INTERCONNECT=m is the second one. > > If INTERCONNECT=m, QCOM3 shouldn't be y. I think the following is > enough: > > depends on INTERCONNECT=y || INTERCONNECT=USB_DWC3_QCOM > This misses the case where INTERCONNECT=n and USB_DWC3_QCOM=[ym] which I don't see a reason for breaking. But if only INTERCONNECT where a bool, then we don't need to specify a depends on, because it will either be there, or the stubs will. We've come to this conclusion in a lot of different frameworks and I don't see why we should do this differently with INTERCONNECT. Regards, Bjorn