• Felipe Balbi's avatar
    usb: gadget: function: uvc: make sure to balance ep enable/disable · c92bae75
    Felipe Balbi authored
    If a set_alt() to the same alternate setting that's
    already selected is received, functions are required
    to reset the interface state, this means we must disable
    all endpoints and reenable them again.
    
    This is also documented on our kdoc for struct usb_function
    
    * @set_alt: (REQUIRED) Reconfigures altsettings; function drivers may
    *	initialize usb_ep.driver data at this time (when it is used).
    *	Note that setting an interface to its current altsetting resets
    *	interface state, and that all interfaces have a disabled state.
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    c92bae75
f_uvc.c 22.1 KB