usb: gadget: set gadget state as configured
Set gadget device state as configurated after set configuration has finished. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>hifive-unleashed-5.1
parent
1f7fc40876
commit
6027f3173e
|
@ -634,6 +634,7 @@ static int set_config(struct usb_composite_dev *cdev,
|
||||||
if (!c)
|
if (!c)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
|
||||||
cdev->config = c;
|
cdev->config = c;
|
||||||
|
|
||||||
/* Initialize all interfaces by setting them to altsetting zero. */
|
/* Initialize all interfaces by setting them to altsetting zero. */
|
||||||
|
|
|
@ -1494,6 +1494,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||||
*/
|
*/
|
||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
INFO (dev, "configuration #%d\n", dev->current_config);
|
INFO (dev, "configuration #%d\n", dev->current_config);
|
||||||
|
usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
|
||||||
if (dev->usermode_setup) {
|
if (dev->usermode_setup) {
|
||||||
dev->setup_can_stall = 0;
|
dev->setup_can_stall = 0;
|
||||||
goto delegate;
|
goto delegate;
|
||||||
|
|
Loading…
Reference in New Issue