2014-10-02 02:54:12 +00:00
|
|
|
/*
|
2014-12-12 22:10:17 +00:00
|
|
|
* Greybus bundles
|
2014-10-02 02:54:12 +00:00
|
|
|
*
|
|
|
|
* Copyright 2014 Google Inc.
|
2014-12-12 18:08:42 +00:00
|
|
|
* Copyright 2014 Linaro Ltd.
|
2014-10-02 02:54:12 +00:00
|
|
|
*
|
|
|
|
* Released under the GPLv2 only.
|
|
|
|
*/
|
|
|
|
|
2014-12-12 22:10:17 +00:00
|
|
|
#ifndef __BUNDLE_H
|
|
|
|
#define __BUNDLE_H
|
2014-10-02 02:54:12 +00:00
|
|
|
|
|
|
|
#include <linux/list.h>
|
|
|
|
|
2014-12-12 22:10:17 +00:00
|
|
|
/* Greybus "public" definitions" */
|
|
|
|
struct gb_bundle {
|
2014-10-24 09:34:46 +00:00
|
|
|
struct device dev;
|
2014-12-19 22:56:31 +00:00
|
|
|
struct gb_interface *intf;
|
2016-01-19 11:51:21 +00:00
|
|
|
|
2014-10-02 17:30:02 +00:00
|
|
|
u8 id;
|
2015-04-06 10:19:36 +00:00
|
|
|
u8 class;
|
2016-01-19 11:51:21 +00:00
|
|
|
u8 class_major;
|
|
|
|
u8 class_minor;
|
|
|
|
|
2014-10-03 19:14:22 +00:00
|
|
|
struct list_head connections;
|
2015-04-13 17:48:37 +00:00
|
|
|
u8 *state;
|
2014-10-02 02:54:12 +00:00
|
|
|
|
2014-12-12 22:10:17 +00:00
|
|
|
struct list_head links; /* interface->bundles */
|
2015-10-16 23:54:00 +00:00
|
|
|
void *private;
|
2014-10-02 02:54:12 +00:00
|
|
|
};
|
2014-12-12 22:10:17 +00:00
|
|
|
#define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)
|
2014-10-02 02:54:12 +00:00
|
|
|
|
2014-12-24 21:01:39 +00:00
|
|
|
#define GB_DEVICE_ID_BAD 0xff
|
|
|
|
|
2014-12-12 22:10:17 +00:00
|
|
|
/* Greybus "private" definitions" */
|
2015-04-01 15:02:00 +00:00
|
|
|
struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
|
2015-04-06 10:19:36 +00:00
|
|
|
u8 class);
|
2015-12-07 14:05:43 +00:00
|
|
|
int gb_bundle_add(struct gb_bundle *bundle);
|
2015-06-12 15:21:11 +00:00
|
|
|
void gb_bundle_destroy(struct gb_bundle *bundle);
|
2014-10-02 02:54:12 +00:00
|
|
|
|
2014-12-12 22:10:17 +00:00
|
|
|
#endif /* __BUNDLE_H */
|