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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 AB661C04AAF for ; Mon, 20 May 2019 09:46:01 +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 7DFBB20675 for ; Mon, 20 May 2019 09:46:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BX4bZfG+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=renesasgroup.onmicrosoft.com header.i=@renesasgroup.onmicrosoft.com header.b="VQUBEhXC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DFBB20675 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.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:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w3m26DLgs1lsZqqtLZKCXKJkhUAZX/s06BByNDSXI4Y=; b=BX4bZfG+urN9zt TUPay+bn8I2R3M+JGjzVhXSafd/itXCPuY2uuB5rhwFaQdNkNQeyryKA5NCKbrnFGGrWyAS/h5iHq J1Yz2tPOZdiRhUiRPC/qK2jbMn0DGxTzKxCJ+Ysf1P50AaNz5Iu8N4fyuL5cTJTbjiTVWBGKHKXhA /r947Y5Mr46+DIXIau/na3zWNFh4N1i1Ks9cCIHgpSR6H7enrLjl74qv5ls0F+zKdScUgK+qdeaMh vHk85GFFWNedPaLh5N/GIFS7E0IxMNEZ6nhm1h2dkX1qrltlehoQk7QFhhf/KextwWlRpq4Sewuqv cAfVNVGCkNa/9kuly7Xw==; 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 1hSerl-0002tQ-F3; Mon, 20 May 2019 09:45:57 +0000 Received: from mail-eopbgr1400103.outbound.protection.outlook.com ([40.107.140.103] helo=JPN01-TY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSerh-0002ra-JM; Mon, 20 May 2019 09:45:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector2-renesasgroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=urpvzzQMwcJiy4pS6sbeUbf3IXmOHrotPzfsSLOu+jQ=; b=VQUBEhXCljvfslhV9g2Q453aZBsEEDY4u85rcnbg85FkxRFbU7ixwB+r7uDcmdLf5BSgp+7OA8U286ofQtID0uOVs6H4R+MMMRQjVSjao/3FV8YDaZjme91fSqrpcCetrRe7zG6V5yb8+St29HJzh2COUr0EX+oSCZKkHVcsTpI= Received: from OSBPR01MB2103.jpnprd01.prod.outlook.com (52.134.242.17) by OSBPR01MB1832.jpnprd01.prod.outlook.com (52.134.227.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.18; Mon, 20 May 2019 09:45:46 +0000 Received: from OSBPR01MB2103.jpnprd01.prod.outlook.com ([fe80::a146:39f0:5df9:11bc]) by OSBPR01MB2103.jpnprd01.prod.outlook.com ([fe80::a146:39f0:5df9:11bc%7]) with mapi id 15.20.1900.020; Mon, 20 May 2019 09:45:46 +0000 From: Biju Das To: Heikki Krogerus Subject: RE: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node Thread-Topic: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node Thread-Index: AQHVCjGxbEdsIx4ReU+jIZIOb3TooaZvJLIAgAApPICABAgXgIAAWsCAgAAANlCAAAi9gIAADx0A Date: Mon, 20 May 2019 09:45:46 +0000 Message-ID: References: <1557823643-8616-1-git-send-email-chunfeng.yun@mediatek.com> <1557823643-8616-5-git-send-email-chunfeng.yun@mediatek.com> <20190517103736.GA1490@kuha.fi.intel.com> <20190517130511.GA1887@kuha.fi.intel.com> <1558319951.10179.352.camel@mhfsdcap03> <20190520080359.GC1887@kuha.fi.intel.com> <20190520083601.GE1887@kuha.fi.intel.com> In-Reply-To: <20190520083601.GE1887@kuha.fi.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=biju.das@bp.renesas.com; x-originating-ip: [193.141.220.21] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7de330c8-b2f9-4f0c-566a-08d6dd07eeee x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:OSBPR01MB1832; x-ms-traffictypediagnostic: OSBPR01MB1832: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 004395A01C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(346002)(366004)(396003)(136003)(376002)(51914003)(199004)(189003)(53936002)(2906002)(66066001)(7736002)(86362001)(305945005)(256004)(3846002)(186003)(26005)(6916009)(25786009)(6116002)(4326008)(74316002)(7416002)(66946007)(6246003)(66476007)(66556008)(76116006)(66446008)(64756008)(73956011)(81166006)(8676002)(81156014)(229853002)(33656002)(8936002)(316002)(6506007)(6436002)(966005)(71190400001)(76176011)(71200400001)(478600001)(6306002)(9686003)(54906003)(486006)(44832011)(102836004)(55016002)(68736007)(7696005)(99286004)(14454004)(52536014)(5660300002)(446003)(476003)(11346002); DIR:OUT; SFP:1102; SCL:1; SRVR:OSBPR01MB1832; H:OSBPR01MB2103.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: bp.renesas.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: M2DfjJcjOvAj1G2bcfYc5O71X9OD6RTGyNzrf5DRGPHrh/WjVADLv5os5ugnuNb6lZCm1uRBVnIVTCcopdEnnIUyq8dJceis681i4g4GekgANxHW7Rf/W3seLugTY436DVC0tq4ZUl2psPVoyGSdedb6nfVzKaUC4NOHdqYvL44sWR+JyHmmY053FJM9HcKnsfkEVEmSjf2OwLmjf0u0/I/F3l7i8q0jasgvU1naSzfm+YGJDdxMzCxGCg6ckkZ9h2J+//zcktGu/x2E9Ch7+PdW0BeWtb8G/Pf7kOZte13XRbq5lM3WqCBN8Viw4ZSBLER8eAsRrbWoSwc2Fn6dCeReYGHaqGPXoY5BZglmGPHKgCqw4OUrfJr5xFtclkdHjwGXG7q5Fm2lieRvuKie4nvTjKc4M4p8d4H2geaktyQ= MIME-Version: 1.0 X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7de330c8-b2f9-4f0c-566a-08d6dd07eeee X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2019 09:45:46.1271 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB1832 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_024553_640758_A353B8B1 X-CRM114-Status: GOOD ( 24.93 ) 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 , Badhri Jagan Sridharan , Greg Kroah-Hartman , Linus Walleij , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Matthias Brugger , Andy Shevchenko , Rob Herring , "linux-mediatek@lists.infradead.org" , Min Guo , Chunfeng Yun , 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 Heikki, Thanks for the feedback. > Subject: Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by > node > > On Mon, May 20, 2019 at 08:06:41AM +0000, Biju Das wrote: > > Hi Heikki, > > > > > Subject: Re: [PATCH v5 4/6] usb: roles: add API to get > > > usb_role_switch by node > > > > > > On Mon, May 20, 2019 at 10:39:11AM +0800, Chunfeng Yun wrote: > > > > Hi, > > > > On Fri, 2019-05-17 at 16:05 +0300, Heikki Krogerus wrote: > > > > > Hi, > > > > > > > > > > On Fri, May 17, 2019 at 01:37:36PM +0300, Heikki Krogerus wrote: > > > > > > On Tue, May 14, 2019 at 04:47:21PM +0800, Chunfeng Yun wrote: > > > > > > > Add fwnode_usb_role_switch_get() to make easier to get > > > > > > > usb_role_switch by fwnode which register it. > > > > > > > It's useful when there is not device_connection registered > > > > > > > between two drivers and only knows the fwnode which register > > > > > > > usb_role_switch. > > > > > > > > > > > > > > Signed-off-by: Chunfeng Yun > > > > > > > Tested-by: Biju Das > > > > > > > > > > > > Acked-by: Heikki Krogerus > > > > > > > > > > Hold on. I just noticed Rob's comment on patch 2/6, where he > > > > > points out that you don't need to use device graph since the > > > > > controller is the parent of the connector. Doesn't that mean you > > > > > don't really need this API? > > > > No, I still need it. > > > > The change is about the way how to get fwnode; when use device > > > > graph, get fwnode by of_graph_get_remote_node(); but now will get > > > > fwnode by of_get_parent(); > > > > > > OK, I get that, but I'm still not convinced about if something like > > > this function is needed at all. I also have concerns regarding how > > > you are using the function. I'll explain in comment to the patch 5/6 in this > series... > > > > FYI, Currently I am also using this api in my patch series. > > https://patchwork.kernel.org/patch/10944637/ > > Yes, and I have the same question for you I jusb asked in comment I added > to the patch 5/6 of this series. Why isn't usb_role_switch_get() enough? Currently no issue. It will work with this api as well, since the port node is part of controller node. For eg:- https://patchwork.kernel.org/patch/10944627/ However if any one adds port node inside the connector node, then this api may won't work as expected. Currently I get below error [ 2.299703] OF: graph: no port node found in /soc/i2c@e6500000/hd3ss3220@47 For eg:- hd3ss3220@47 { compatible = "ti,hd3ss3220"; ... .... usb_con: connector { .... .... port { hd3ss3220_ep: endpoint@0 { reg = <0>; remote-endpoint = <&usb3peri_role_switch>; }; }; }; }; Regards, Biju _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel