Re: [PATCH 06/20] usb: hcd-pci: introduce pm-ops for platform-pci devs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

(sorry for the delay)

On Fri, Aug 26, 2011 at 11:06:42AM -0400, Alan Stern wrote:
> On Fri, 26 Aug 2011, Felipe Balbi wrote:
> 
> > While it might possible to merge them. I think we should take smaller
> > steps at a time. Those files are already there anyway. So at first we
> > find a way to clean up the ifdeferry and allow all of those to be built
> > on all archs (it's definitely possible)
> 
> Just how did you want all these different drivers to be built?  You
> said you don't want a separate module containing an entire copy of the
> ehci core for each arch; you want the core to be shared.  That means
> one of two things:
> 
> 	Build a single monolithic module containing all the drivers.
> 	This is quite likely to require a large bunch of #ifdefs.
> 
> 	Build a minimal driver module for each arch, and have the ehci
> 	core in a single separate module that gets loaded for
> 	dependency resolution.  This is likely to require a bunch of
> 	exported symbols.
> 
> Which approach are you advocating?

let udev do its thing:

- arch code will add a platform_device to the driver model, e.g.:
  platform_device_register(&omap_ehci_device);

- based on the device add uevent, udev will load the correct module (in
  this case ehci-omap.ko)

- ehci-omap.ko instantiates and add EHCI-core platform_device:
  ehci = platform_device_alloc("ehci", -1);
  platform_device_add(ehci);

- based on the device add uevent, udev will load the correct module (in
  this case ehci-hcd.ko)

So, there aren't only two approaches for this, can't you see ? There's
no need for exported symbols, or a monolithic driver.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux