hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/usb/composite.h
....@@ -118,7 +118,6 @@
118118 /**
119119 * struct usb_function - describes one function of a configuration
120120 * @name: For diagnostics, identifies the function.
121
- * @intf_id: Interface ID
122121 * @strings: tables of strings, keyed by identifiers assigned during bind()
123122 * and by language IDs provided in control requests
124123 * @fs_descriptors: Table of full (or low) speed descriptors, using interface and
....@@ -164,13 +163,6 @@
164163 * GetStatus() request when the recipient is Interface.
165164 * @func_suspend: callback to be called when
166165 * SetFeature(FUNCTION_SUSPEND) is reseived
167
- * @func_is_suspended: Tells whether the function is currently in
168
- * Function Suspend state (used in Super Speed mode only).
169
- * @func_wakeup_allowed: Tells whether Function Remote Wakeup has been allowed
170
- * by the USB host (used in Super Speed mode only).
171
- * @func_wakeup_pending: Marks that the function has issued a Function Wakeup
172
- * while the USB bus was suspended and therefore a Function Wakeup
173
- * notification needs to be sent once the USB bus is resumed.
174166 *
175167 * A single USB function uses one or more interfaces, and should in most
176168 * cases support operation at both full and high speeds. Each function is
....@@ -198,7 +190,6 @@
198190
199191 struct usb_function {
200192 const char *name;
201
- int intf_id;
202193 struct usb_gadget_strings **strings;
203194 struct usb_descriptor_header **fs_descriptors;
204195 struct usb_descriptor_header **hs_descriptors;
....@@ -242,9 +233,6 @@
242233 int (*get_status)(struct usb_function *);
243234 int (*func_suspend)(struct usb_function *,
244235 u8 suspend_opt);
245
- unsigned func_is_suspended:1;
246
- unsigned func_wakeup_allowed:1;
247
- unsigned func_wakeup_pending:1;
248236 /* private: */
249237 /* internals */
250238 struct list_head list;
....@@ -260,9 +248,6 @@
260248 int usb_function_activate(struct usb_function *);
261249
262250 int usb_interface_id(struct usb_configuration *, struct usb_function *);
263
-int usb_func_wakeup(struct usb_function *func);
264
-
265
-int usb_get_func_interface_id(struct usb_function *func);
266251
267252 int config_ep_by_speed_and_alt(struct usb_gadget *g, struct usb_function *f,
268253 struct usb_ep *_ep, u8 alt);
....@@ -452,7 +437,7 @@
452437 #define OS_STRING_IDX 0xEE
453438
454439 /**
455
- * struct usb_composite_device - represents one composite usb gadget
440
+ * struct usb_composite_dev - represents one composite usb gadget
456441 * @gadget: read-only, abstracts the gadget's usb peripheral controller
457442 * @req: used for control responses; buffer is pre-allocated
458443 * @os_desc_req: used for OS descriptors responses; buffer is pre-allocated
....@@ -540,6 +525,8 @@
540525 extern int usb_string_ids_n(struct usb_composite_dev *c, unsigned n);
541526
542527 extern void composite_disconnect(struct usb_gadget *gadget);
528
+extern void composite_reset(struct usb_gadget *gadget);
529
+
543530 extern int composite_setup(struct usb_gadget *gadget,
544531 const struct usb_ctrlrequest *ctrl);
545532 extern void composite_suspend(struct usb_gadget *gadget);