Linux USB Gadget Driver Being Extended For WebUSB
WebUSB enables access to USB hardware devices from web pages and is backed by the W3C. WebUSB works in a cross-platform way and can already be used on Linux with the likes of Google Chrome.
This specification is published under the W3C Community Contributor Agreement, which in particular allows to implement the specification without any royalties.
This patch adds optional support for Linux-based USB gadgets wishing to expose such a landing page.
During device enumeration, a host recognizes that the announced USB version is at least 2.01, which means, that there are BOS descriptors available. The device than announces WebUSB support using a platform device capability. This includes a vendor code under which the landing page URL can be retrieved using a vendor-specific request.
See the kernel mailing list for more details on this WebUSB support patch for the USB gadget code. Those curious about the WebUSB API can find the current spec via GitHub.