-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: gadget: f_hid: convert to new function interface with backward c…
…ompatibility Converting hid to the new function interface requires converting the USB hid's function code and its users. This patch converts the f_hid.c to the new function interface. The file can now be compiled into a separate usb_f_hid.ko module. The old function interface is provided by means of a preprocessor conditional directives. After all users are converted, the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
- Loading branch information
Andrzej Pietrasiewicz
authored and
Felipe Balbi
committed
Nov 6, 2014
1 parent
00896f6
commit cb38253
Showing
5 changed files
with
227 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* u_hid.h | ||
* | ||
* Utility definitions for the hid function | ||
* | ||
* Copyright (c) 2014 Samsung Electronics Co., Ltd. | ||
* http://www.samsung.com | ||
* | ||
* Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef U_HID_H | ||
#define U_HID_H | ||
|
||
#include <linux/usb/composite.h> | ||
|
||
struct f_hid_opts { | ||
struct usb_function_instance func_inst; | ||
int minor; | ||
unsigned char subclass; | ||
unsigned char protocol; | ||
unsigned short report_length; | ||
unsigned short report_desc_length; | ||
unsigned char *report_desc; | ||
bool report_desc_alloc; | ||
}; | ||
|
||
int ghid_setup(struct usb_gadget *g, int count); | ||
void ghid_cleanup(void); | ||
|
||
#endif /* U_HID_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters