From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard.zhao@freescale.com (Richard Zhao) Date: Thu, 17 May 2012 10:41:19 +0800 Subject: [PATCH v1 4/7] usb: chipidea: add imx driver binding In-Reply-To: <87txzgb454.fsf@ashishki-desk.ger.corp.intel.com> References: <1337090303-16046-1-git-send-email-richard.zhao@freescale.com> <1337090303-16046-5-git-send-email-richard.zhao@freescale.com> <878vgscq4b.fsf@ashishki-desk.ger.corp.intel.com> <20120516130823.GA30755@b20223-02.ap.freescale.net> <87txzgb454.fsf@ashishki-desk.ger.corp.intel.com> Message-ID: <20120517024118.GB30755@b20223-02.ap.freescale.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, May 16, 2012 at 05:18:47PM +0300, Alexander Shishkin wrote: > Richard Zhao writes: > > > On Wed, May 16, 2012 at 02:38:44PM +0300, Alexander Shishkin wrote: > >> > + plat_ci = platform_device_alloc("ci_hdrc", (int)res->start); > >> > >> Regarding the instance id here: you probably want to use something more > >> meaningful than the starting address. I was thinking about stealing id > >> allocator from Felipe's dwc3 (dwc3_get_device_id()), but decided to > >> first deal with more important things. > > hmm... Is dwc3_get_device_id() really meaningful than base address? > > It just record the sequence number. > > Well, if you indeed have more than one controller, you might want to > know, for example, which one registered first. Or, one might simply not > like the look of "/sys/bus/platform/devices/ci_hdrc.-5898240". ah, it's singed integer. Then I agree dwc3_get_device_id() is a better and simple way, and we can find the physical device by looking at ci_hdrc devicie's parent. Thanks Richard > > Regards, > -- > Alex >