mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* u_tcm.h
|
|
*
|
|
* Utility definitions for the tcm function
|
|
*
|
|
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* Author: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
|
|
*
|
|
* 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_TCM_H
|
|
#define U_TCM_H
|
|
|
|
#include <linux/usb/composite.h>
|
|
|
|
/**
|
|
* @dependent: optional dependent module. Meant for legacy gadget.
|
|
* If non-null its refcount will be increased when a tpg is created and
|
|
* decreased when tpg is dropped.
|
|
* @dep_lock: lock for dependent module operations.
|
|
* @ready: true if the dependent module information is set.
|
|
* @can_attach: true a function can be bound to gadget
|
|
* @has_dep: true if there is a dependent module
|
|
*
|
|
*/
|
|
struct f_tcm_opts {
|
|
struct usb_function_instance func_inst;
|
|
struct module *dependent;
|
|
struct mutex dep_lock;
|
|
bool ready;
|
|
bool can_attach;
|
|
bool has_dep;
|
|
|
|
/*
|
|
* Callbacks to be removed when legacy tcm gadget disappears.
|
|
*
|
|
* If you use the new function registration interface
|
|
* programmatically, you MUST set these callbacks to
|
|
* something sensible (e.g. probe/remove the composite).
|
|
*/
|
|
int (*tcm_register_callback)(struct usb_function_instance *);
|
|
void (*tcm_unregister_callback)(struct usb_function_instance *);
|
|
};
|
|
|
|
#endif /* U_TCM_H */
|