diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2015-03-03 04:52:32 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-10 16:33:41 -0400 |
commit | ee1cd515e889d222f5a7397fead0a9db1214edea (patch) | |
tree | 8946a1608e69546a85d4311ca6ab5bdcd3852a3f /Documentation/usb | |
parent | a2a8e48a94c78c72b5dd1e4c8d190c5c54aca7a4 (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.txt | 47 |
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. | |||
19 | 16. UAC1 function | 19 | 16. UAC1 function |
20 | 17. UAC2 function | 20 | 17. UAC2 function |
21 | 18. UVC function | 21 | 18. UVC function |
22 | 19. PRINTER function | ||
22 | 23 | ||
23 | 24 | ||
24 | 1. ACM function | 25 | 1. ACM function |
@@ -726,3 +727,49 @@ with these patches: | |||
726 | http://www.spinics.net/lists/linux-usb/msg99220.html | 727 | http://www.spinics.net/lists/linux-usb/msg99220.html |
727 | 728 | ||
728 | host: luvcview -f yuv | 729 | host: luvcview -f yuv |
730 | |||
731 | 19. PRINTER function | ||
732 | ==================== | ||
733 | |||
734 | The function is provided by usb_f_printer.ko module. | ||
735 | |||
736 | Function-specific configfs interface | ||
737 | ------------------------------------ | ||
738 | |||
739 | The function name to use when creating the function directory is "printer". | ||
740 | The 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 | |||
745 | Testing the PRINTER function | ||
746 | ---------------------------- | ||
747 | |||
748 | The most basic testing: | ||
749 | |||
750 | device: run the gadget | ||
751 | # ls -l /devices/virtual/usb_printer_gadget/ | ||
752 | |||
753 | should show g_printer<number>. | ||
754 | |||
755 | If udev is active, then /dev/g_printer<number> should appear automatically. | ||
756 | |||
757 | host: | ||
758 | |||
759 | If udev is active, then e.g. /dev/usb/lp0 should appear. | ||
760 | |||
761 | host->device transmission: | ||
762 | |||
763 | device: | ||
764 | # cat /dev/g_printer<number> | ||
765 | host: | ||
766 | # cat > /dev/usb/lp0 | ||
767 | |||
768 | device->host transmission: | ||
769 | |||
770 | # cat > /dev/g_printer<number> | ||
771 | host: | ||
772 | # cat /dev/usb/lp0 | ||
773 | |||
774 | More advanced testing can be done with the prn_example | ||
775 | described in Documentation/usb/gadget-printer.txt. | ||