projects/linux·blob master · refs

42 lines · 1.2 KiB

1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * u_eem.h
4 *
5 * Utility definitions for the eem function
6 *
7 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
8 * http://www.samsung.com
9 *
10 * Author: Andrzej Pietrasiewicz <[email protected]>
11 */
12
13#ifndef U_EEM_H
14#define U_EEM_H
15
16#include <linux/usb/composite.h>
17
18/**
19 * struct f_eem_opts - EEM function options
20 * @func_inst: USB function instance.
21 * @net: The net_device associated with the EEM function.
22 * @bound: True if the net_device is shared and pre-registered during the
23 * legacy composite driver's bind phase (e.g., multi.c). If false,
24 * the EEM function will register the net_device during its own
25 * bind phase.
26 * @bind_count: Tracks the number of configurations the EEM function is
27 * bound to, preventing double-registration of the @net device.
28 * @lock: Protects the data from concurrent access by configfs read/write
29 * and create symlink/remove symlink operations.
30 * @refcnt: Reference counter for the function instance.
31 */
32struct f_eem_opts {
33 struct usb_function_instance func_inst;
34 struct net_device *net;
35 bool bound;
36 int bind_count;
37
38 struct mutex lock;
39 int refcnt;
40};
41
42#endif /* U_EEM_H */