xref: /linux/drivers/usb/gadget/function/u_eem.h (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1*2e759738SNishad Kamdar /* SPDX-License-Identifier: GPL-2.0 */
200a2430fSAndrzej Pietrasiewicz /*
300a2430fSAndrzej Pietrasiewicz  * u_eem.h
400a2430fSAndrzej Pietrasiewicz  *
500a2430fSAndrzej Pietrasiewicz  * Utility definitions for the eem function
600a2430fSAndrzej Pietrasiewicz  *
700a2430fSAndrzej Pietrasiewicz  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
800a2430fSAndrzej Pietrasiewicz  *		http://www.samsung.com
900a2430fSAndrzej Pietrasiewicz  *
101b4a3b51SAndrzej Pietrasiewicz  * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
1100a2430fSAndrzej Pietrasiewicz  */
1200a2430fSAndrzej Pietrasiewicz 
1300a2430fSAndrzej Pietrasiewicz #ifndef U_EEM_H
1400a2430fSAndrzej Pietrasiewicz #define U_EEM_H
1500a2430fSAndrzej Pietrasiewicz 
1600a2430fSAndrzej Pietrasiewicz #include <linux/usb/composite.h>
1700a2430fSAndrzej Pietrasiewicz 
1800a2430fSAndrzej Pietrasiewicz struct f_eem_opts {
1900a2430fSAndrzej Pietrasiewicz 	struct usb_function_instance	func_inst;
2000a2430fSAndrzej Pietrasiewicz 	struct net_device		*net;
2100a2430fSAndrzej Pietrasiewicz 	bool				bound;
2200a2430fSAndrzej Pietrasiewicz 
2300a2430fSAndrzej Pietrasiewicz 	/*
2400a2430fSAndrzej Pietrasiewicz 	 * Read/write access to configfs attributes is handled by configfs.
2500a2430fSAndrzej Pietrasiewicz 	 *
2600a2430fSAndrzej Pietrasiewicz 	 * This is to protect the data from concurrent access by read/write
2700a2430fSAndrzej Pietrasiewicz 	 * and create symlink/remove symlink.
2800a2430fSAndrzej Pietrasiewicz 	 */
2900a2430fSAndrzej Pietrasiewicz 	struct mutex			lock;
3000a2430fSAndrzej Pietrasiewicz 	int				refcnt;
3100a2430fSAndrzej Pietrasiewicz };
3200a2430fSAndrzej Pietrasiewicz 
3300a2430fSAndrzej Pietrasiewicz #endif /* U_EEM_H */
34