aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-03 18:03:22 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-04 20:25:57 -0800
commit7bc6faaca7d829d4e6f5d65909d5068f73b76bda (patch)
tree80ebab1a7366c6aaae4fd197cac39d4cd3b236c3 /drivers/staging/greybus/greybus.h
parentgreybus: remove obsolete comment (diff)
downloadlinux-dev-7bc6faaca7d829d4e6f5d65909d5068f73b76bda.tar.xz
linux-dev-7bc6faaca7d829d4e6f5d65909d5068f73b76bda.zip
greybus: create host-device compilation unit
Move everything host-device related to hd.c and hd.h. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus.h')
-rw-r--r--drivers/staging/greybus/greybus.h48
1 files changed, 1 insertions, 47 deletions
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index 219b2ff76558..8eb63e020c2d 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -25,6 +25,7 @@
#include "greybus_manifest.h"
#include "greybus_protocols.h"
#include "manifest.h"
+#include "hd.h"
#include "endo.h"
#include "svc.h"
#include "firmware.h"
@@ -57,53 +58,6 @@
#define CPORT_ID_MAX 4095 /* UniPro max id is 4095 */
#define CPORT_ID_BAD U16_MAX
-struct greybus_host_device;
-
-/* Greybus "Host driver" structure, needed by a host controller driver to be
- * able to handle both SVC control as well as "real" greybus messages
- */
-struct greybus_host_driver {
- size_t hd_priv_size;
-
- int (*cport_enable)(struct greybus_host_device *hd, u16 cport_id);
- int (*cport_disable)(struct greybus_host_device *hd, u16 cport_id);
- int (*message_send)(struct greybus_host_device *hd, u16 dest_cport_id,
- struct gb_message *message, gfp_t gfp_mask);
- void (*message_cancel)(struct gb_message *message);
- int (*latency_tag_enable)(struct greybus_host_device *hd, u16 cport_id);
- int (*latency_tag_disable)(struct greybus_host_device *hd,
- u16 cport_id);
-};
-
-struct greybus_host_device {
- struct kref kref;
- struct device *parent;
- const struct greybus_host_driver *driver;
-
- struct list_head interfaces;
- struct list_head connections;
- struct ida cport_id_map;
-
- /* Number of CPorts supported by the UniPro IP */
- size_t num_cports;
-
- /* Host device buffer constraints */
- size_t buffer_size_max;
-
- struct gb_endo *endo;
- struct gb_connection *initial_svc_connection;
- struct gb_svc *svc;
-
- /* Private data for the host driver */
- unsigned long hd_priv[0] __aligned(sizeof(s64));
-};
-
-struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *hd,
- struct device *parent,
- size_t buffer_size_max,
- size_t num_cports);
-void greybus_remove_hd(struct greybus_host_device *hd);
-
struct greybus_driver {
const char *name;