From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933121AbcIGIxE (ORCPT ); Wed, 7 Sep 2016 04:53:04 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:62073 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756921AbcIGIxB (ORCPT ); Wed, 7 Sep 2016 04:53:01 -0400 From: Arnd Bergmann To: Peter Chen Cc: Felipe Balbi , Leo Li , Grygorii Strashko , Russell King - ARM Linux , Catalin Marinas , Yoshihiro Shimoda , "linux-usb@vger.kernel.org" , Sekhar Nori , lkml , Stuart Yoder , Scott Wood , David Fisher , "Thang Q. Nguyen" , Alan Stern , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Date: Wed, 07 Sep 2016 10:52:46 +0200 Message-ID: <4780626.ofOZnpf19s@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160907074428.GB13903@b29397-desktop> References: <20562703.Glp77l1PBf@wuerfel> <20160907074428.GB13903@b29397-desktop> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:ZbECV84DXLKb25N5luMOY+kiw4vfmWQs1LE4P2obE1AkIk2RTjB A3cF4M5mqzCx4bKzsTnv4qMoQXguxrMgGgTwFbNIyUB6nmR6PxcVr3BglFMe5jBxcHYKNaU L7ZvDoLOsicnqzsyLDZOhNUPwkUtazocvC+hH87YbOMcW9txmVFBqQnbAGxjrB4WiISkE7v ujwaGuqMKhQpJsEDMf48Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:zLY2Wxx7QmU=:MjY+R2JNFyldBnHtYHh0tU TMznxgX1xnTjPLr68SaihxAfQTZNHfak6vrdUHSn+snB7K2EM7mTe1Uf0cHbYhtJpMQQ65SJr TtJSzXiIKEl4Yue1i/J6lmiz9IjTq4za4c6kh3PvubiI5sGf2b+61GR2qT9T/VnYkO/zmsM42 EG8XDGHQHDn4YHxGT6T9obeWphf1e6zRnFf6F4dYfqUyQcGE5QxxO06xZ/rCDvjFUr1gbl/MM UMQ2gvsglBkGLt+lyyoQ2NG0gXUcDgQNAAHUhq+O7o0K2mCXuT5d2wi/TBbCdX+JPSIryRM4i 9LDcmU8TgbfFxdrSX/Mlvt9aZR/D3xI0sprV6zT6eiBP5At9hyls4dN+7wms6JGk6HYgxvjPN A48d/dfFSgJD8XWgqgWuq2MYrTriIlcACCJZpCPRj2RoCYsFeqLnd0nzY74P0YnXpsEWemAKO U+RQ6CLaj7WRSnzi8FuNLXZ93o4ilgImxBY9ZTYpEVUPb2yK/jnhB7e8YasN38Oi/NQ5TSzBO d77fUEreHZIQXyrILDhvftYbk4D00IKAVLR9Fr0fnBmcu22TNeCaS5EfnpHsf4nhI2QsRHtsU aH804DphZNDHz4HSzJCeINE79IyBi0W82d4fvBlVYecxiZcIcDv+zP2ifyZx/usAprpUGAgUo uySq6hpm4LFX3Ro34YKz5iBO1jHmn6pSM5k/VDe3eu/cw3BUqeOhjv7GkWC79gjgC6DRuuPZM 77hMZszknMTCnJWd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > The pre-condition of DT function at USB HCD core works is the host > controller device has of_node, since it is the root node for USB tree > described at DT. If the host controller device is not at DT, it needs > to try to get its of_node, the chipidea driver gets it through its > parent node [1] > > [1] https://lkml.org/lkml/2016/8/8/119 > Ah, this is what I was referring to in the other mail. However, the way you set the of_node might be dangerous too: We should generally not have two platform_device structures with the same of_node pointer, most importantly it may cause the child device to be bound to the same driver as the parent device since the probing is done by compatible string. As you tested it successfully, it must work at the moment on your machine, but it could easily break depending on deferred probing or module load order. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 07 Sep 2016 10:52:46 +0200 Subject: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev In-Reply-To: <20160907074428.GB13903@b29397-desktop> References: <20562703.Glp77l1PBf@wuerfel> <20160907074428.GB13903@b29397-desktop> Message-ID: <4780626.ofOZnpf19s@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > The pre-condition of DT function at USB HCD core works is the host > controller device has of_node, since it is the root node for USB tree > described at DT. If the host controller device is not at DT, it needs > to try to get its of_node, the chipidea driver gets it through its > parent node [1] > > [1] https://lkml.org/lkml/2016/8/8/119 > Ah, this is what I was referring to in the other mail. However, the way you set the of_node might be dangerous too: We should generally not have two platform_device structures with the same of_node pointer, most importantly it may cause the child device to be bound to the same driver as the parent device since the probing is done by compatible string. As you tested it successfully, it must work at the moment on your machine, but it could easily break depending on deferred probing or module load order. Arnd