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 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 42CDBC43381 for ; Fri, 15 Mar 2019 09:14:44 +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 0FF002184C for ; Fri, 15 Mar 2019 09:14:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="H+5Ndv+f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FF002184C 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=5fEpdVtmK2Pi5b+b2ZQFwRUR7AfD8yTljb6t3zgLYdI=; b=H+5Ndv+f/5HwS9 Gtb4qH2yVFDHQ+VyO9PtjV1Rq/Hg1HMIBqbX1E5hvl2VmLhEtiDc8JX49SiJohyRYbQhYAkLH+UlL qpcDE0XWsOK/rL+nN8aWPcRZytn0nTUKVQR0InGIuahufSD+XcGn2whzYJKmTG3kbSBTtSCwBybMO BKIMGy4QVjfZPgn2HvAGfR+TvPqyEcDv3EqFCQnYBK/x031XGe09KnewqJP6w/g16Nc6siKU/1qDK /Nd2Hui4cSZdKC79//1ehy6EZo3FHmHoj2OXC/AR7YHw0k2RH83YJbawy3JAPQl52fFV3qaViXsls iG0+rYHwooXcPczzpBdg==; 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 1h4ivF-0004aN-Kv; Fri, 15 Mar 2019 09:14:37 +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 1h4ivC-0004ZW-3y; Fri, 15 Mar 2019 09:14:35 +0000 X-UUID: 06c4f0d002db41b9bdbbcd9caf94ee09-20190315 X-UUID: 06c4f0d002db41b9bdbbcd9caf94ee09-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 667325702; Fri, 15 Mar 2019 01:14:13 -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:14:11 -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:14:09 +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:14:08 +0800 Message-ID: <1552641248.10179.134.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:14:08 +0800 In-Reply-To: <20190315091127.GF7752@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> <20190315091127.GF7752@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_021434_158743_C5D8EA94 X-CRM114-Status: GOOD ( 11.85 ) 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:11 +0200, Heikki Krogerus wrote: > On Fri, Mar 15, 2019 at 10:18:35AM +0200, Heikki Krogerus wrote: > > Andy already pointed out that you need to use fwnodes. > > > > Rule of thumb: You always use fwnodes. Only if there is something that > > can't be done with fwnodes you use DT or ACPI nodes directly. > > > > In this case there is absolutely nothing that would prevent you from > > using fwnodes. > > ... > > > +/** > > + * usb_role_switch_get_by_node - Find USB role switch by it's parent node > > + * @node: The node that register USB role switch > > + * > > + * Finds and returns role switch registered by @node. The reference count > > + * for the found switch is incremented. > > + */ > > +struct usb_role_switch *usb_role_switch_get_by_node(struct device_node *node) > > This is my proposal for function prototype: > > struct usb_role_switch * > fwnode_usb_role_switch_get(struct fwnode_handle *fwnode); Ok, thanks again > > > thanks, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel