Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/*
2 * Greybus Module code
3 *
4 * Copyright 2016 Google Inc.
5 * Copyright 2016 Linaro Ltd.
6 *
7 * Released under the GPLv2 only.
8 */
9
10#ifndef __MODULE_H
11#define __MODULE_H
12
13struct gb_module {
14 struct device dev;
15 struct gb_host_device *hd;
16
17 struct list_head hd_node;
18
19 u8 module_id;
20 size_t num_interfaces;
21
22 bool disconnected;
23
24 struct gb_interface *interfaces[0];
25};
26#define to_gb_module(d) container_of(d, struct gb_module, dev)
27
28struct gb_module *gb_module_create(struct gb_host_device *hd, u8 module_id,
29 size_t num_interfaces);
30int gb_module_add(struct gb_module *module);
31void gb_module_del(struct gb_module *module);
32void gb_module_put(struct gb_module *module);
33
34#endif /* __MODULE_H */