[Patch 0/3] Detect link status on usb0

Mike Westerhof (mwester) mwester at dls.net
Thu May 14 03:46:19 CEST 2009

This series of patches makes it possible for the link status (carrier)
to be properly detected for the usb0 interface (g_ether gadget) on the
GTA02.  This is desirable for network managers to be able to properly
manage the usb0 interface, since without this patch there is no way for
anything to know that the USB cable has been disconnected.  (In fact,
not even the udc driver is aware of a cable disconnect; at present it
does not actually discover the disconnect until the USB cable is
reconnected, when a reset event occurs.)

The first patch is a link to a patch that should be cherry-picked from
upstream; it simply corrects the plumbing for carrier detection from the
g_ether driver.

The second patch adds the ability for the s3c2410_udc driver to poll for
vbus (USB cable present), rather than use an interrupt.  This is
necessary because the vbus signal on the GTA02 is not directly connected
to a GPIO line and thus cannot interrupt or be read directly from the
s3c2410_udc driver.

The third patch adds the GTA02-specific plumbing in mach-gta02.c to
provide a function to return the USB cable status.  The cable status is
retrieved from the pcf50633 driver, in a similar manner to existing code.

A fourth patch is yet-to-be-written, and would be the GTA01-specific

Comments, critiques, rewrites, and fruit pies gratefully accepted.

Mike (mwester)

More information about the openmoko-kernel mailing list