]>
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; |
88e6d37c | 20 | u8 class; |
748e1230 | 21 | struct list_head connections; |
75052a55 | 22 | u8 *state; |
8c12cde3 | 23 | |
1db0a5ff | 24 | struct list_head links; /* interface->bundles */ |
6ea462a4 | 25 | void *private; |
8c12cde3 | 26 | }; |
1db0a5ff | 27 | #define to_gb_bundle(d) container_of(d, struct gb_bundle, dev) |
8c12cde3 | 28 | |
1b6ea0db GKH |
29 | #define GB_DEVICE_ID_BAD 0xff |
30 | ||
1db0a5ff | 31 | /* Greybus "private" definitions" */ |
7c183f70 | 32 | struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, |
88e6d37c | 33 | u8 class); |
fe53b45c | 34 | void gb_bundle_destroy(struct gb_bundle *bundle); |
8c12cde3 | 35 | |
1db0a5ff | 36 | #endif /* __BUNDLE_H */ |