]>
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; |
4ab9b3c2 | 18 | struct gb_interface *intf; |
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 | |
1b6ea0db GKH |
27 | #define GB_DEVICE_ID_BAD 0xff |
28 | ||
1db0a5ff | 29 | /* Greybus "private" definitions" */ |
4ab9b3c2 GKH |
30 | struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 module_id); |
31 | void gb_bundle_destroy(struct gb_interface *intf); | |
32 | int gb_bundle_init(struct gb_interface *intf, u8 module_id, u8 device_id); | |
8c12cde3 | 33 | |
4ab9b3c2 | 34 | struct gb_bundle *gb_bundle_find(struct gb_interface *intf, u8 bundle_id); |
fb69cb50 | 35 | void gb_bundle_bind_protocols(void); |
1a4c013a | 36 | |
1db0a5ff | 37 | #endif /* __BUNDLE_H */ |