summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/spilib.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-05-14 23:42:19 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-14 23:18:32 +0200
commit4c412921c78732f8f803a5906c97746ede5cf77c (patch)
tree34a66afaf78d53f9cf5b6bb945bd8474f747d0a1 /drivers/staging/greybus/spilib.h
parentdc0754088e53e42fee1f880bc0c2002f624fe26f (diff)
downloadop-kernel-dev-4c412921c78732f8f803a5906c97746ede5cf77c.zip
op-kernel-dev-4c412921c78732f8f803a5906c97746ede5cf77c.tar.gz
greybus: spi: Restructure spi.c to share it with other bundle drivers
This patch restructures spi.c as spilib core, so that the same logic can be reused for SPI connections implemented as part of different bundle types. This is required for Firmware Management Bundle. Note that the 'struct gb_protocol' and its callback aren't moved to a separate file in this commit to make its reviews easier. That will be done by a following patch. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/spilib.h')
-rw-r--r--drivers/staging/greybus/spilib.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/staging/greybus/spilib.h b/drivers/staging/greybus/spilib.h
new file mode 100644
index 0000000..9be1b31
--- /dev/null
+++ b/drivers/staging/greybus/spilib.h
@@ -0,0 +1,18 @@
+/*
+ * Greybus SPI library header
+ *
+ * copyright 2016 google inc.
+ * copyright 2016 linaro ltd.
+ *
+ * released under the gplv2 only.
+ */
+
+#ifndef __SPILIB_H
+#define __SPILIB_H
+
+struct gb_connection;
+
+int gb_spilib_master_init(struct gb_connection *connection, struct device *dev);
+void gb_spilib_master_exit(struct gb_connection *connection);
+
+#endif /* __SPILIB_H */
OpenPOWER on IntegriCloud