summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/spilib.h
diff options
context:
space:
mode:
authorViresh Kumar2016-05-14 20:12:19 +0200
committerGreg Kroah-Hartman2016-05-14 23:18:32 +0200
commit4c412921c78732f8f803a5906c97746ede5cf77c (patch)
tree34a66afaf78d53f9cf5b6bb945bd8474f747d0a1 /drivers/staging/greybus/spilib.h
parentgreybus: Remove bridge PHY protocol specific classes (diff)
downloadkernel-qcow2-linux-4c412921c78732f8f803a5906c97746ede5cf77c.tar.gz
kernel-qcow2-linux-4c412921c78732f8f803a5906c97746ede5cf77c.tar.xz
kernel-qcow2-linux-4c412921c78732f8f803a5906c97746ede5cf77c.zip
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 000000000000..9be1b3189834
--- /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 */