mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
usb: gadget: hid: add configfs support
Make the hid function available for gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
5ca8d3ec99
commit
21a9476a7b
5 changed files with 178 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue