> Op 13 feb. 2015, om 20:25 heeft Hans de Goede <[email protected]> het > volgende geschreven: > > Hi All, > > I'm happy to report that after a lot of poking at the Allwinner > musb code I've it working reliable in both host and peripheral mode, > as well as automatically switching between the 2 depending on which > cable gets plugged. > > My wip code is available here: > > https://github.com/jwrdegoede/linux-sunxi/commits/sunxi-wip > > Functionality wise this is complete and I expect / hope there will be > no functional changes before it goes upstream. > > There are 2 things which need to be done before it can be submitted > upstream though: > > 1) All the ForceVbus / ForceID stuff needs to be cleaned up > 2) Currently this is not suitable for multiplatform kernels as it > puts a #ifdef MACH_SUNXI in musb_regs.h, this needs to be fixed. > > 1) is just a matter of removing a whole lot of unnecessary indirection > in the code, and giving the relevant defines better names > 2) I've a plan for, I just need some time for this. > > I've so far only tested this on a cubietruck, I started development on > a cubieboard, but the cubieboard has the Vusb hardwired to the 5V of the > board (or at least mine does) meaning that the Vusb enable gpio does not > do anything, and Vusb-detect always reads as 1, I think my current code > may work despite this, but I need to test. > > Note that the dts modifications for the cubietruck / cubieboard enable > the musb controller in otg mode, which means that it will not "start" > until a gadget driver is loaded. For testing I use: > > insmod libcomposite.ko > insmod u_serial.ko > insmod usb_f_acm.ko > insmod g_serial.ko
If you want to use composite gadgets, have a look at https://github.com/libusbg/libusbg/ . That should have save/restore functions for the gadget combination you select. IIRC both tizen and jolla use this for their gadget infrastructure. regards, Koen -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
