On Sat, 2017-05-27 at 21:58 -0400, Alan Stern wrote:
> Vbus is the +5V power provided on the USB bus by the host controller.
> Bus-powered devices use it as their sole power source, and self-powered
> devices may use it in conjunction with their own alternative power
> source.
>
> If a UDC driver sees that vbus isn't present then it can assume the UDC
> isn't connected to anything. (There are some odd exceptions involving
> USB OTG ("On-The-Go"), where the host and peripheral can swap roles --
> normally you don't have to worry about that.) That's how the driver
> detects a disconnection.
Ok so this controller has no specific detection of VBUS, in fact the
eval board has it unwired. (It's meant to be a BMC with a permanent
connection to the host). I can control the "connection" to the host via
a register, so I've plumbed that into my pullup() callback, I assume
that's the right thing to do at this stage.
> The interfaces required for a UDC driver are explained to some extent
> by the kerneldoc in include/linux/usb/gadget.h. For anything you still
> don't understand, feel free to ask on this mailing list.
Ah I had missed some of those explanations for some reason, thanks :-)
I'll leave the virtual hub aside for now until I have "single device"
mode working.
Once I resume work on this, the "interesting" bit will be how to
allocate the 15 "generic" endpoints to the 5 devices. I'm thinking of a
rather static layout, possibly via the device-tree. That or I'll add a
custom configfs interface to the UDC driver...
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html