4 * Utility definitions for the tcm function
6 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * http://www.samsung.com
9 * Author: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
19 #include <linux/usb/composite.h>
22 * @dependent: optional dependent module. Meant for legacy gadget.
23 * If non-null its refcount will be increased when a tpg is created and
24 * decreased when tpg is dropped.
25 * @dep_lock: lock for dependent module operations.
26 * @ready: true if the dependent module information is set.
27 * @can_attach: true a function can be bound to gadget
28 * @has_dep: true if there is a dependent module
32 struct usb_function_instance func_inst
;
33 struct module
*dependent
;
34 struct mutex dep_lock
;
40 * Callbacks to be removed when legacy tcm gadget disappears.
42 * If you use the new function registration interface
43 * programmatically, you MUST set these callbacks to
44 * something sensible (e.g. probe/remove the composite).
46 int (*tcm_register_callback
)(struct usb_function_instance
*);
47 void (*tcm_unregister_callback
)(struct usb_function_instance
*);