[PATCH] Provide two similar usb device configs with high and low power setting.

Stefan Schmidt stefan at datenfreihafen.org
Fri Mar 30 00:19:30 CEST 2007


Hello.

This patch fixes #260.

The main idea is to provide the same usb device config twice. One with
500mA MaxPower and one with 100mA. This allows charging the battery
faster on a powered hub or host and have it also available on bus
powered hubs for example debug board v2.

Normally g_ether provides one config with cdc_ether only and a second
one if RNDIS is enabled. With this patch it provides 2 or 4 configs.

In cdc_ether only mode all works fine. On host the high power config
is choosen and on debug board the low power config.

Enabling RNDIS makes it a bit more tricky. A special order of the
configs is needed:

rndis_config
eth_config
eth_config_low
rndis_config_low

Anybody know offhand why this is needed?

With this order I'm able to connect to the Neo1973 directly connected
to my host or through the debug board.

On the debug board rejecting of the two 500mA configs works fine:
usb 2-1.3: rejected 2 configurations due to insufficient available bus power

The one remaining problem is that the RNDIS, windows compatible,
support is untested. It seems I have to search such a box to test it.
:(

At the moment this patch applies on top of the current quilt set. I
would suggest to remove g_ether-highpower.patch and let this one base
on the vanilla g_ether driver once we like to apply this one. If you
agree I can take care off it.

regards
Stefan Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two-usb-power-configs.patch
Type: text/x-diff
Size: 5555 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20070330/e883f546/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 241 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20070330/e883f546/attachment.pgp 


More information about the openmoko-kernel mailing list