Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp74223ybs; Tue, 26 May 2020 04:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywC+HB+Y14Dd9ECs3R7xgu0EYPgv4uzlyLmkjwg2IB7cqDjPfdMgI7ZwsosueCW/43p/ri X-Received: by 2002:a17:907:b11:: with SMTP id h17mr620136ejl.430.1590491250954; Tue, 26 May 2020 04:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590491250; cv=none; d=google.com; s=arc-20160816; b=cWZkkMv1LLIAMzD1nF/K3LIE52SlRNBo04jT/WEpS97agJ0cXVdLl5ErF0ytS/h665 ehqn+aowP9729T0AwaKhwpfX9uB6iHsETpXrUzUvJrPI46UWDJYFpaAEpu8mDfEefuhp IiseSZYQhopwjp2fAcr1xCC+RrGppyK+tkNr0O7WI9+90SgtrQXe+GFOw4a5WawPTyn4 pNYUg4tMigy4P/SLgvVU5BBQnXuWJexSFRhYn+X883p12LW/1wSiWGv62iMOfd/oFoK0 kOQPhODV+9R/OplOjXlRsHqnWtULMDcsYC+exPe9k2cX5lZd3oL3gGgocZ+z3Lk1s5zx 19Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=SKBdhs63Zp2CNDzdiohqN/c3xb5urkHJTxlo1SdluWA=; b=QMyQ/QTs64bVT0uvul7+EyZw1hBgtV+qiiewwkUFm6vAIio8SLgO4dJXGgQf2Evy5+ burZBbMxV1F5N4luuCLYiE1G82Meo2524/WhbIeC/DudCF1EF7WR3v7Nu6M5nvYmRdTt LIBOOyCB6HVkH9iFFRxIqUGKw8XGa0E85rinsnEgkUNvtCCGsqYQsrirFRTcwyHrwF+/ 8oIlyxkd9oWJBVWG8EUczFVw3nieWsjovm4u0rk8IrjwnOqfG0gzdoTolS0bNsITtUf/ A4ApkDPCVxG+u37Fs8fRTCeOI0B3wMtLS7iwKaTgxVzxWUVTl2dtD27S2hoa9d+75E65 McPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=VmvcfV+w; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si11579917edn.453.2020.05.26.04.07.00; Tue, 26 May 2020 04:07:30 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=VmvcfV+w; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389019AbgEZLEr (ORCPT + 99 others); Tue, 26 May 2020 07:04:47 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:54912 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389004AbgEZLEq (ORCPT ); Tue, 26 May 2020 07:04:46 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590491085; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=SKBdhs63Zp2CNDzdiohqN/c3xb5urkHJTxlo1SdluWA=; b=VmvcfV+w2UFlOhZKMY6i3W/t7qnb61gBsnKC3HBAfBZjP19eOkq/FrPV1lTEDSP/84dH/c4f cryxSprXaL6oegMeLb3r7/gzE+F5IlFFdTrCI5f4u+kwhyeVtX875McOtDHKhOI3SBMDzZTC jPVouq+4XVqY4dIYr/eF4pduhxE= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 5eccf7b03131442d9595171a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 26 May 2020 11:04:16 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7D019C43395; Tue, 26 May 2020 11:04:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.206.24.160] (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sanm) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9663FC433C6; Tue, 26 May 2020 11:04:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9663FC433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=sanm@codeaurora.org Subject: Re: [PATCH v7 2/4] usb: dwc3: qcom: Add interconnect support in dwc3 driver To: Bjorn Andersson , Felipe Balbi Cc: Georgi Djakov , 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: "Sandeep Maheswaram (Temp)" Message-ID: Date: Tue, 26 May 2020 16:34:06 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200518183512.GE2165@builder.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, Please let me know how to go forward with this patch 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 -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation