On Thu, Apr 13, 2006 at 09:18:03PM +0200, David Brownell wrote:
> On Thursday 13 April 2006 1:32 am, Jan Veldeman wrote:
> 
> > The structure I'll be using is 1 platform driver which controls the
> > hardware and shared pieces, with on top of that a host and gadget
> > driver.
> 
> And one puzzle would be the Kconfig ... that's a lot of code to get
> working right (do the host side on 2.6.recent!), so I suggest you
> have an explicit "Driver Mode" choice saying whether the board serves
> in host role, peripheral role, or as an OTG device.

I'll be using a recent 2.6 to do the development on.

As the board can be both host and peripheral at the same time, I was
thinking of doing it this way:
* have 1 "core" driver with separate host and gadget modules
  (all tristate in Kconfig)
* have the platform_data specify which ports are host/peripheral/otg
  (this platform data belongs to the core driver)
* the host and gadget modules can then ask the core driver which
  port(s) it may use

> 
> A three-component structure seems essential; the core should manage
> fifos and DMA (and eventually OTG role management, in conjunction
> with usbcore), and two c67300_{host,gadget}.c modules to handle the
> host and peripheral side APIs.  It might work well to have different
> developers working in parallel on the host and peripheral sides, for
> all the non-core-code.

do you also have a suggestion for directory layout?
I don't think the "core" module belongs to the usb/core/,
but it should also not be placed under usb/host or usb/gadget.

I see it either as:

usb/
  <some_name_to_be_invented>/c67x00_core.c
  host/c67x00_host.c
  gadget/c67x00_gadget.c

or everything in a separate directory:

usb/
  control/    # or another name ;-)
    c67x00/
      c67x00_core.c
      c67x00_host.c
      c67x00_gadget.c


Best regards,
Jan



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to