On Sun, Mar 09, 2008 at 08:24:33AM -0300, Werner Almesberger wrote: > Felipe Balbi wrote: > > Ehehe, pm chips... you never know:-p > > Yeah, it's a complex beast for sure. But in general, it's behaving, > so I hope this is something we can solve. > > > How are you triggering usb charging, btw? > > We charge with 500mA if the host signals that we can, and we detect > our charger through a 48k, 1% resistor between ID and GND. > > Our charger doesn't short D+ and D-. That new standard came too > late for that :-(
But you're misusing id pin. This is a huge hardware issue and should be solve asap. Id pin should generate an interrupt to the otg transceiver for it to switch between host and peripheral roles. Also the drivers/usb/gadget/ether.c modifications is wrong. It will never work on otg sessions at all. Instead of hardcoding 500mA current draw in the config descriptors, you should add 2 sets of them: 1. drawing 500mA 2. drawing 100mA If we're in an otg session, the first descriptor will be rejected and the second one will be chosen for work ;-) BTW, really precise resistor you got:-p 1% tolerance, wow. That must be kinda difficult to find :-p -- Best Regards, Felipe Balbi [EMAIL PROTECTED] http://blog.felipebalbi.com
