usb: musb: gadget: support musb-specific test modes
authorFelipe Balbi <felipe.balbi@nokia.com>
Fri, 12 Mar 2010 08:29:12 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:32 +0000 (13:21 -0700)
we can support the musb-specific test modes on the
vendor specific range of test selector as stated
on USB Specification Table 9-7 Test Mode Selectors.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget_ep0.c

index 53d06451f820348fbe3a7907ce448ffd7d82bd39..21b9788d02439f268625f65b611f49ea97cfd450 100644 (file)
@@ -351,6 +351,31 @@ __acquires(musb->lock)
                                                musb->test_mode_nr =
                                                        MUSB_TEST_PACKET;
                                                break;
+
+                                       case 0xc0:
+                                               /* TEST_FORCE_HS */
+                                               pr_debug("TEST_FORCE_HS\n");
+                                               musb->test_mode_nr =
+                                                       MUSB_TEST_FORCE_HS;
+                                               break;
+                                       case 0xc1:
+                                               /* TEST_FORCE_FS */
+                                               pr_debug("TEST_FORCE_FS\n");
+                                               musb->test_mode_nr =
+                                                       MUSB_TEST_FORCE_FS;
+                                               break;
+                                       case 0xc2:
+                                               /* TEST_FIFO_ACCESS */
+                                               pr_debug("TEST_FIFO_ACCESS\n");
+                                               musb->test_mode_nr =
+                                                       MUSB_TEST_FIFO_ACCESS;
+                                               break;
+                                       case 0xc3:
+                                               /* TEST_FORCE_HOST */
+                                               pr_debug("TEST_FORCE_HOST\n");
+                                               musb->test_mode_nr =
+                                                       MUSB_TEST_FORCE_HOST;
+                                               break;
                                        default:
                                                goto stall;
                                        }