]>
Commit | Line | Data |
---|---|---|
8c12cde3 | 1 | /* |
1db0a5ff | 2 | * Greybus bundles |
8c12cde3 AE |
3 | * |
4 | * Copyright 2014 Google Inc. | |
a46e9671 | 5 | * Copyright 2014 Linaro Ltd. |
8c12cde3 AE |
6 | * |
7 | * Released under the GPLv2 only. | |
8 | */ | |
9 | ||
1db0a5ff GKH |
10 | #ifndef __BUNDLE_H |
11 | #define __BUNDLE_H | |
8c12cde3 AE |
12 | |
13 | #include <linux/list.h> | |
14 | ||
1db0a5ff GKH |
15 | /* Greybus "public" definitions" */ |
16 | struct gb_bundle { | |
f0f61b90 | 17 | struct device dev; |
4ec7b079 | 18 | struct gb_interface_block *gb_ib; |
63cc932b | 19 | u8 id; |
1a4c013a | 20 | u8 device_id; |
748e1230 | 21 | struct list_head connections; |
8c12cde3 | 22 | |
1db0a5ff | 23 | struct list_head links; /* interface->bundles */ |
8c12cde3 | 24 | }; |
1db0a5ff | 25 | #define to_gb_bundle(d) container_of(d, struct gb_bundle, dev) |
8c12cde3 | 26 | |
1db0a5ff GKH |
27 | /* Greybus "private" definitions" */ |
28 | struct gb_bundle *gb_bundle_create(struct gb_interface_block *gb_ib, u8 module_id); | |
29 | void gb_bundle_destroy(struct gb_interface_block *gb_ib); | |
30 | int gb_bundle_init(struct gb_interface_block *gb_ib, u8 module_id, u8 device_id); | |
8c12cde3 | 31 | |
1db0a5ff | 32 | struct gb_bundle *gb_bundle_find(struct gb_interface_block *gb_ib, u8 bundle_id); |
1a4c013a | 33 | |
1db0a5ff | 34 | #endif /* __BUNDLE_H */ |