aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/usb
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2015-03-03 04:52:32 -0500
committerFelipe Balbi <balbi@ti.com>2015-03-10 16:33:41 -0400
commitee1cd515e889d222f5a7397fead0a9db1214edea (patch)
tree8946a1608e69546a85d4311ca6ab5bdcd3852a3f /Documentation/usb
parenta2a8e48a94c78c72b5dd1e4c8d190c5c54aca7a4 (diff)
usb: gadget: printer: add configfs support
Add support for configfs interface so that f_printer can be used as a component of usb gadgets composed with it. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'Documentation/usb')
-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.