Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp181531ybs; Tue, 26 May 2020 06:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiGo3ACLuhXeaHSHBsAz+GZhrmSdaI2odQP7f8reCrzCod6xvMiHPqaekbH9+IgIOdBRLs X-Received: by 2002:a17:906:c401:: with SMTP id u1mr1154818ejz.151.1590500597648; Tue, 26 May 2020 06:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590500597; cv=none; d=google.com; s=arc-20160816; b=pFRDQzfzCy8GhYg9V9AUxTLPRJcm5os6mcCF58FtpruRqd+f5vDF6iAn9IssiMB6NB 2/AZLYWNWF17eMjeOo/uAb7fjtHXE35pxeYgHjy31CQOcEoy7ZV0LejeVA+juYnDjL9G gWqZ+SWK9YTBqezU89JBmkdKqOeniP26pvkzdohQV55rLfZ+dOsgh/Kb67OOU6d14MiM xeGzJp6ULcYo7ncdbe7K8kunTlls7bqrCKShOarI0xrdbL4ZUyQfKyDwgF0AXVorRdN1 2dTnWl9H4oP9j+5ywcVI1tRjzyaN950wgg9bIBT2Nf0mx325ndRtqQAuDHKIK5w93Qa5 skEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:from :references:cc:to:subject:dkim-signature; bh=GCJy06H1pRSu/Q8++uLNPv3+6vo/2WW9QkHbY0KEiLc=; b=zGWgDVj55WniZO/ekDdnyjdZaFeLtBRZUWWeYsOYp5D4HON3x82qgxCMcoZ4+cqIyG hft5uahu3CWLyvKhVOWVqTGhgfyw2jwWLdRYD4428erFf3WcN097W+hrVizbT1/dqjTv NMt4Hn7texUhMpAg17q58oWjBdxaOEpWdqcI399NlyJyRh0PW4pGefx+iiasJOfDLwl3 2Q4ZEJhXlopxKIugLiSsCrQ0h0K0jqrlUZaXHAwJy87TQNjHZLcKAtBKkZ4oruMNUflq hNJEU/qa5BGO8qumydo7NO+eNnA/OJZZVqU6WBZiHp90NhGxYxIRKmrEx01eWjfztVWr Ftyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DRrl3Ns2; 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 c102si11645637edf.562.2020.05.26.06.42.54; Tue, 26 May 2020 06:43:17 -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=DRrl3Ns2; 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 S1731262AbgEZLeR (ORCPT + 99 others); Tue, 26 May 2020 07:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbgEZLeQ (ORCPT ); Tue, 26 May 2020 07:34:16 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A54A8C03E97E for ; Tue, 26 May 2020 04:34:16 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id n5so2882534wmd.0 for ; Tue, 26 May 2020 04:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=GCJy06H1pRSu/Q8++uLNPv3+6vo/2WW9QkHbY0KEiLc=; b=DRrl3Ns2cJtzWcB6n08kFBvUdS852of8mbk4G+JIjPqrWBaJGGvRjWGr0TmeWM1818 sCmUgDq0mCooR8UdicwXhfWsEJ71VbOGwp23pWgDG3od3z/eL2boVuZx57QgX5ghLWdX k1XtO2ENMFpPABY4aUMcQisk30Zb8odi0bUp0L2mWZjAYEb3ccFiAHu1ecQMY1YfJhkQ eam1KAlzu1+il+h1EM+PP68zqwWkVV8XJ8gVHJj+XJOroLhBuSHpxRZr/BKigyF6ncwj iNNEYtL94deHmix6HL1DjaNekCiPGsyyvmMZe+SPAcPhi88osltKRE5la1Dr04GUwVLh rqRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GCJy06H1pRSu/Q8++uLNPv3+6vo/2WW9QkHbY0KEiLc=; b=OY3IbiRmpls7feJhdBBuMwH2qUkTKp3Cq1+qVQ9kAMqts0whFU6a011cHx6QISNa93 bNeuV40IFVUzvvuZrdAaIfbFqXop70AZ8sBcr0KSJiS/j5iuOp6AGIU68AIsH1cCu1i4 xjgHyFcRhVvniViewed3T6s1cvsT4d4g0DK2Ko7c1rVvJJrUWeTQyrW1i0eccLZP1RTm pAPNYRFHWxjegNiOyxbnmixsIoR7kHrX3ur/PjP0Q+he98wFcX38W1DZJ3V69kYndhNs Ehwa0WdfuFmgWaaF6RybkCnFbE9JoQITEa5szQZP9MJo11LAxNr3vQMI6bJWguka2rqD +6lA== X-Gm-Message-State: AOAM531uDvFXu3vLBOX+hAbNdQbpz0vErLoWUdxuuwYwqerViFHmkeah 6hxH5Qn2wGOtM0DmJ5Kv4ob6yw== X-Received: by 2002:a1c:5408:: with SMTP id i8mr843024wmb.94.1590492855379; Tue, 26 May 2020 04:34:15 -0700 (PDT) Received: from macbook.local ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id q128sm951100wma.38.2020.05.26.04.34.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 May 2020 04:34:14 -0700 (PDT) Subject: Re: [PATCH v7 2/4] usb: dwc3: qcom: Add interconnect support in dwc3 driver To: "Sandeep Maheswaram (Temp)" , Bjorn Andersson , Felipe Balbi Cc: Matthias Kaehlcke , 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 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> <20200518183512.GE2165@builder.lan> From: Georgi Djakov Message-ID: <0723aee9-9ea4-dab5-e083-3cf3858a8f96@linaro.org> Date: Tue, 26 May 2020 14:34:11 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.05.20 14:04, Sandeep Maheswaram (Temp) wrote: > Hi Felipe, > > Please let me know how to go forward with this patch > Hi Sandeep, Please just add a patch to fix the allmodconfig error. Felipe has suggested to introduce a separate patch which exports the device_is_bound() function. This export should precede the addition of interconnect support. Also regarding the "depends on INTERCONNECT || !INTERCONNECT" change, no "depends on" would be needed, as we just made the interconnect framework bool. Thanks, Georgi > Regards > > Sandeep > > On 5/19/2020 12:05 AM, Bjorn Andersson wrote: >> 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 >