summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/endo.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-04-07 18:26:53 (GMT)
committerGreg Kroah-Hartman <gregkh@google.com>2015-04-09 20:50:09 (GMT)
commit0f035acdedcb4f016c2b7cc23758d9191713d951 (patch)
tree4d649229a91c19b8f86ed122b6ad224a22836dcf /drivers/staging/greybus/endo.h
parent764e824e2fa5cca0d7c671ae58e65cd06aed0fce (diff)
downloadlinux-0f035acdedcb4f016c2b7cc23758d9191713d951.tar.xz
greybus: endo: add endo structures and logic
This adds endo.c and endo.h and provides functions to create an endo and the initial 0x0555 set of modules. But, it doesn't hook this logic up into the running code yet, that comes next. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/endo.h')
-rw-r--r--drivers/staging/greybus/endo.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/staging/greybus/endo.h b/drivers/staging/greybus/endo.h
new file mode 100644
index 0000000..649093e
--- /dev/null
+++ b/drivers/staging/greybus/endo.h
@@ -0,0 +1,32 @@
+/*
+ * Greybus endo code
+ *
+ * Copyright 2015 Google Inc.
+ *
+ * Released under the GPLv2 only.
+ */
+
+#ifndef __ENDO_H
+#define __ENDO_H
+
+/* Greybus "public" definitions" */
+struct gb_svc {
+ u8 serial_number[10];
+ u8 version[10];
+};
+
+struct gb_endo {
+ struct device dev;
+ struct gb_svc svc;
+ u16 type;
+};
+#define to_gb_endo(d) container_of(d, struct gb_endo, dev)
+
+
+/* Greybus "private" definitions */
+struct greybus_host_device;
+
+struct gb_endo *gb_endo_create(struct greybus_host_device *hd);
+void gb_endo_remove(struct gb_endo *endo);
+
+#endif /* __ENDO_H */