diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-11-06 11:12:03 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-06 23:18:19 +0100 |
commit | 21a9476a7ba847e413bf1c144d7c614532aed6dd (patch) | |
tree | 606683b13651d00398aa9a0b5a873fcf1d49ba32 /Documentation | |
parent | usb: gadget: f_hid: use usb_gstrings_attach (diff) | |
download | linux-21a9476a7ba847e413bf1c144d7c614532aed6dd.tar.xz linux-21a9476a7ba847e413bf1c144d7c614532aed6dd.zip |
usb: gadget: hid: add configfs support
Make the hid function available for gadgets composed with configfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/configfs-usb-gadget-hid | 11 | ||||
-rw-r--r-- | Documentation/usb/gadget_hid.txt | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-hid b/Documentation/ABI/testing/configfs-usb-gadget-hid new file mode 100644 index 000000000000..f12e00e6baa3 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-hid @@ -0,0 +1,11 @@ +What: /config/usb-gadget/gadget/functions/hid.name +Date: Nov 2014 +KernelVersion: 3.19 +Description: + The attributes: + + protocol - HID protocol to use + report_desc - blob corresponding to HID report descriptors + except the data passed through /dev/hidg<N> + report_length - HID report length + subclass - HID device subclass to use diff --git a/Documentation/usb/gadget_hid.txt b/Documentation/usb/gadget_hid.txt index 12696c2e43fb..7a0fb8e16e27 100644 --- a/Documentation/usb/gadget_hid.txt +++ b/Documentation/usb/gadget_hid.txt @@ -74,6 +74,13 @@ static struct platform_device my_hid = { You can add as many HID functions as you want, only limited by the amount of interrupt endpoints your gadget driver supports. +Configuration with configfs + + Instead of adding fake platform devices and drivers in order to pass + some data to the kernel, if HID is a part of a gadget composed with + configfs the hidg_func_descriptor.report_desc is passed to the kernel + by writing the appropriate stream of bytes to a configfs attribute. + Send and receive HID reports HID reports can be sent/received using read/write on the |