Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2941201ybk; Mon, 18 May 2020 11:38:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+EmPBo1CIQ//r26C7ZZLZvM4sA+dikrg52XKnEd5iEvJUiqNG4wfGoXLtbgEJeARlSUf/ X-Received: by 2002:a17:906:ae93:: with SMTP id md19mr15526783ejb.4.1589827104026; Mon, 18 May 2020 11:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589827104; cv=none; d=google.com; s=arc-20160816; b=okqmeBCtlo2iI15RoNeynQYpYeoV6x8D4VH3X0E0ZvTnZRddwCzygogeEitMjSUCNL KdDv1k2Kf5ZtJikdxHi7OPnQ5uh4jTxTmtIwFxR/7NWi+u/hm0SBRJknP7LiSCBAjhXI X9Ez/we++FdOQj4G9XsNUrZs+7fjTBwX/4tZNYMcOUxyZdKneS92kMJltf8pjCtPwrH6 wJYs94YhPpPOqrv2YxghZjoU5+dyw5g8ILbaon9bsgBn/X7+IZiveu7ggwXEizL35n6n mh7xOfNhEDJlUCXMHswnrg39jT7mCBK6NeNY+VObIJvnQWxTWHPM52CEo3w/djZFI7eb kxGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gvKKfXKVwXyHM5zyQzU2yfD82YJ/ssxteenCSL12PQo=; b=CVoW6heQGz9AEAcwpPBRsyThxB79mA8IWnrJgyefXTJiFqRtMWdyfMMM1hmLOStM2A YWxjdVG8/I4AI3k1z47HTjMT8DcX/PDYANGgj203Xvy9Ec6qEa/Gx39y6gSXqLiKiruK rX9/J8g74hEytp9IQNJunbjno7DHwg83+Ey912ZoM3YcfhXIqtNACtt5ku/1NgWxAcjq GSB7mX3hPdZ1uE3ZOQskc86Iosho4qjd00E+aRIlZyGfUmDPb2kwlTojpXLCrFKyW3iu tlya24l+S+k92uA/AF2PcaVJXcEhGZhrkqXq7zn7QWbJto5PYKdm/tMa0efRsU9l5Jj5 HXag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SP6KFNP8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr12si9891007ejc.352.2020.05.18.11.38.01; Mon, 18 May 2020 11:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SP6KFNP8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728475AbgERSgh (ORCPT + 99 others); Mon, 18 May 2020 14:36:37 -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-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