On Mon, May 10, 2010 at 9:33 AM, Sergey Lapin <slapinid@xxxxxxxxx> wrote: > Hi, all! > > I try to implement external OTG transceiver on PXA270. > I just need basic device mode at the moment. > > A problem is that PXA itself handles interrupt of external chip via > UDC interrupt. But I need to read my chip-specific registers > from there while I want to maintain pxa270_udc in a generic way > without cluttering it with i2c calls, so I can implement it in the > following ways: > > * make chip-specific data struct global (like it is in isp1301_omap.c > and make exported function in OTG driver, enable handling of OTG interrupts > in pxa27x_udc and call that function from there. > * add API function like otg_handle_interrupt, enable handling of OTG interrupts > in pxa27x_udc and call it from there. Which seems to be less messy. > > Any other suggestions? If that work is really being done somewhere, > I'd like to help with testing. > The problem with isp1301_omap.c is that it's not separating the components into otg controller and otg transciever, which means at the moment the quickest way is to write something similar as isp1301_pxa27x.c, but apparently, the optimal way in my POV is to have a good abstraction, so the OTG transceiver and controller code can be re-used. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html