Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-16 Thread Andrew Bresticker
On Thu, May 15, 2014 at 2:18 PM, Thierry Reding wrote: > On Thu, May 15, 2014 at 01:18:22PM -0700, Andrew Bresticker wrote: >> Arnd, >> >> On Thu, May 15, 2014 at 1:17 AM, Arnd Bergmann wrote: >> > On Wednesday 14 May 2014 17:33:02 Andrew Bresticker wrote: >> >> + >> >> +int tegra_xhci_register_m

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Thierry Reding
On Thu, May 15, 2014 at 01:18:22PM -0700, Andrew Bresticker wrote: > Arnd, > > On Thu, May 15, 2014 at 1:17 AM, Arnd Bergmann wrote: > > On Wednesday 14 May 2014 17:33:02 Andrew Bresticker wrote: > >> + > >> +int tegra_xhci_register_mbox_notifier(struct notifier_block *nb) > >> +{ > >> + int

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Alan Stern
On Thu, 15 May 2014, Andrew Bresticker wrote: > > This does not feel appropriate at all: Rather than creating a child device, > > you should have a specific driver that hooks into functions exported > > by the xhci core. See Documentation/driver-model/design-patterns.txt > > This is how DWC3, cur

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Andrew Bresticker
Arnd, On Thu, May 15, 2014 at 1:17 AM, Arnd Bergmann wrote: > On Wednesday 14 May 2014 17:33:02 Andrew Bresticker wrote: >> + >> +int tegra_xhci_register_mbox_notifier(struct notifier_block *nb) >> +{ >> + int ret; >> + >> + mutex_lock(&tegra_xhci_mbox_lock); >> + ret = raw_notifier_c

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Arnd Bergmann
On Thursday 15 May 2014 11:19:40 Thierry Reding wrote: > > > + > > > + xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); > > > + if (!xhci) { > > > + dev_err(dev, "Failed to allocate XHCI host\n"); > > > + ret = -ENOMEM; > > > + goto out; > > > + } >

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Thierry Reding
On Thu, May 15, 2014 at 10:17:10AM +0200, Arnd Bergmann wrote: > On Wednesday 14 May 2014 17:33:02 Andrew Bresticker wrote: [...] > > + /* Create child xhci-plat device */ > > + memset(xhci_resources, 0, sizeof(xhci_resources)); > > + res = platform_get_resource(to_platform_device(dev), IORES

Re: [RFC PATCH 06/10] usb: xhci: Add Tegra XHCI host-controller driver

2014-05-15 Thread Arnd Bergmann
On Wednesday 14 May 2014 17:33:02 Andrew Bresticker wrote: > + > +int tegra_xhci_register_mbox_notifier(struct notifier_block *nb) > +{ > + int ret; > + > + mutex_lock(&tegra_xhci_mbox_lock); > + ret = raw_notifier_chain_register(&tegra_xhci_mbox_notifiers, nb); > + mutex_unlock(&te