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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham 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 A394FC43381 for ; Fri, 15 Mar 2019 09:33:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71AE621872 for ; Fri, 15 Mar 2019 09:33:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uNIR2Ctw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71AE621872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Znj+CyN3rmVUac+DbQx3La4qnDgW990tJlylWDHLpKY=; b=uNIR2Ctw1m00ar 1as4iUKj20BDp7b3MlirYnyJc3psnWe3fygaX3MgUh/0imb3MMfWkHVAgWaKLFyoUqmx2DGyH/m+A Xny0G7yejC9wnAnUhEmqxM5lJAAlKkT/N3lgPDfOp3PRjvmS4COPW7o7dxAq7epxqdpF9Fep9IZLX W9+OsMgZ2JUVumsfKMOHTrK5xDadYB+eJsdxyM7WWKxZh6M6OXtiTsXdWEVinCKq9XR/3L4I9T+Oy IiXp4qTrqBdTGQBel3K6A8bB7DgS2/9VQDAvS9pSKZlZNRzByojfNOMJr7YHAuUgNzvnxjFY22RLm N9loEMVAW4Jhw+DXBjoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jDC-0005uX-Ig; Fri, 15 Mar 2019 09:33:10 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jD8-0005tO-Ij; Fri, 15 Mar 2019 09:33:07 +0000 X-UUID: 088828567e0c4d2e8ee550fd2ac16ece-20190315 X-UUID: 088828567e0c4d2e8ee550fd2ac16ece-20190315 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1068700573; Fri, 15 Mar 2019 01:33:04 -0800 Received: from MTKMBS31N2.mediatek.inc (172.27.4.87) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 15 Mar 2019 02:33:02 -0700 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 15 Mar 2019 17:33:00 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 15 Mar 2019 17:33:00 +0800 Message-ID: <1552642379.10179.138.camel@mhfsdcap03> Subject: Re: [PATCH v2 4/6] usb: roles: add API to get usb_role_switch by node From: Chunfeng Yun To: Heikki Krogerus Date: Fri, 15 Mar 2019 17:32:59 +0800 In-Reply-To: <20190315092644.GG7752@kuha.fi.intel.com> References: <1552635513-2378-1-git-send-email-chunfeng.yun@mediatek.com> <1552635513-2378-5-git-send-email-chunfeng.yun@mediatek.com> <20190315081835.GD7752@kuha.fi.intel.com> <1552641204.10179.133.camel@mhfsdcap03> <20190315092644.GG7752@kuha.fi.intel.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_023306_646485_9B852245 X-CRM114-Status: GOOD ( 14.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Hans de Goede , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Badhri Jagan Sridharan , Andy Shevchenko , Rob Herring , linux-mediatek@lists.infradead.org, Min Guo , Matthias Brugger , Adam Thomson , linux-arm-kernel@lists.infradead.org, Li Jun Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Fri, 2019-03-15 at 11:26 +0200, Heikki Krogerus wrote: > Hi Chunfeng, > > On Fri, Mar 15, 2019 at 05:13:24PM +0800, Chunfeng Yun wrote: > > I encounter a build error when CONFIG_USB_ROLE_SWITCH is not enabled, > > > > drivers/usb/mtu3/mtu3_dr.o: In function `ssusb_role_sw_register': > > ./drivers/usb/mtu3/mtu3_dr.c:460: undefined reference to > > `usb_role_switch_register' > > drivers/usb/mtu3/mtu3_dr.o: In function `ssusb_otg_switch_exit': > > ./drivers/usb/mtu3/mtu3_dr.c:491: undefined reference to > > `usb_role_switch_unregister' > > So you need to add dependency on USB_ROLE_SWITCH, right? Yes > > --- a/drivers/usb/mtu3/Kconfig > +++ b/drivers/usb/mtu3/Kconfig > @@ -43,6 +43,7 @@ config USB_MTU3_DUAL_ROLE > bool "Dual Role mode" > depends on ((USB=y || USB=USB_MTU3) && (USB_GADGET=y || USB_GADGET=USB_MTU3)) > depends on (EXTCON=y || EXTCON=USB_MTU3) > + depends on USB_ROLE_SWITCH > help > This is the default mode of working of MTU3 controller where > both host and gadget features are enabled. > > > the following patch has fixed the issue, but seems not get into kernel, > > [v3,08/12] usb: roles: Add usb role switch notifier. > > https://patchwork.kernel.org/patch/10836525/ > > I don't understand how that fixes the problem? That patch will in any > case be targeting v5.2. We are in the middle of merge window, so > nothing is happening until v5.1-rc1 is tagged. It provides some dummy inline functions when USB_ROLE_SWITCH is not enabled, this will avoid build error > > > thanks, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel