aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/usb/gadget-testing.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/usb/gadget-testing.txt')
-rw-r--r--Documentation/usb/gadget-testing.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/usb/gadget-testing.txt b/Documentation/usb/gadget-testing.txt
index 076ac7ba7f93..f45b2bf4b41d 100644
--- a/Documentation/usb/gadget-testing.txt
+++ b/Documentation/usb/gadget-testing.txt
@@ -19,6 +19,7 @@ provided by gadgets.
1916. UAC1 function 1916. UAC1 function
2017. UAC2 function 2017. UAC2 function
2118. UVC function 2118. UVC function
2219. PRINTER function
22 23
23 24
241. ACM function 251. ACM function
@@ -726,3 +727,49 @@ with these patches:
726http://www.spinics.net/lists/linux-usb/msg99220.html 727http://www.spinics.net/lists/linux-usb/msg99220.html
727 728
728host: luvcview -f yuv 729host: luvcview -f yuv
730
73119. PRINTER function
732====================
733
734The function is provided by usb_f_printer.ko module.
735
736Function-specific configfs interface
737------------------------------------
738
739The function name to use when creating the function directory is "printer".
740The printer function provides these attributes in its function directory:
741
742 pnp_string - Data to be passed to the host in pnp string
743 q_len - Number of requests per endpoint
744
745Testing the PRINTER function
746----------------------------
747
748The most basic testing:
749
750device: run the gadget
751# ls -l /devices/virtual/usb_printer_gadget/
752
753should show g_printer<number>.
754
755If udev is active, then /dev/g_printer<number> should appear automatically.
756
757host:
758
759If udev is active, then e.g. /dev/usb/lp0 should appear.
760
761host->device transmission:
762
763device:
764# cat /dev/g_printer<number>
765host:
766# cat > /dev/usb/lp0
767
768device->host transmission:
769
770# cat > /dev/g_printer<number>
771host:
772# cat /dev/usb/lp0
773
774More advanced testing can be done with the prn_example
775described in Documentation/usb/gadget-printer.txt.