greybus: gpbridge.h: move protocol init/exit prototypes
authorGreg Kroah-Hartman <gregkh@google.com>
Sun, 28 Feb 2016 22:42:54 +0000 (14:42 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 3 Mar 2016 21:52:02 +0000 (13:52 -0800)
Create gpbridge.h for the gpbridge-specific function prototypes, the
rest of the greybus drivers don't care about them.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
drivers/staging/greybus/gpbridge.c
drivers/staging/greybus/gpbridge.h [new file with mode: 0644]
drivers/staging/greybus/gpio.c
drivers/staging/greybus/i2c.c
drivers/staging/greybus/protocol.h
drivers/staging/greybus/pwm.c
drivers/staging/greybus/sdio.c
drivers/staging/greybus/spi.c
drivers/staging/greybus/uart.c
drivers/staging/greybus/usb.c

index 29f0984f72132847f8ea4c394463f58e86608912..c82ded14846dbcff184a4b65e8d6abbde316c6cf 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/device.h>
 
 #include "greybus.h"
-
+#include "gpbridge.h"
 
 static int __init gpbridge_init(void)
 {
diff --git a/drivers/staging/greybus/gpbridge.h b/drivers/staging/greybus/gpbridge.h
new file mode 100644 (file)
index 0000000..50ee87b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Greybus GPBridge phy driver
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * Released under the GPLv2 only.
+ */
+
+#ifndef __GPBRIDGE_H
+#define __GPBRIDGE_H
+
+extern int gb_gpio_protocol_init(void);
+extern void gb_gpio_protocol_exit(void);
+
+extern int gb_pwm_protocol_init(void);
+extern void gb_pwm_protocol_exit(void);
+
+extern int gb_uart_protocol_init(void);
+extern void gb_uart_protocol_exit(void);
+
+extern int gb_sdio_protocol_init(void);
+extern void gb_sdio_protocol_exit(void);
+
+extern int gb_usb_protocol_init(void);
+extern void gb_usb_protocol_exit(void);
+
+extern int gb_i2c_protocol_init(void);
+extern void gb_i2c_protocol_exit(void);
+
+extern int gb_spi_protocol_init(void);
+extern void gb_spi_protocol_exit(void);
+
+#endif /* __GPBRIDGE_H */
+
index e7dd99444ea2f5097cbb3ad262363a9c994ec73b..7b2cb5d81e54b52ebaa9e57d8427f1e4c5fd4c3b 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/mutex.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 struct gb_gpio_line {
        /* The following has to be an array of line_max entries */
index cb68b455f8332397f13e179caf1a9b0bc6b4784e..4b96f69318bdae7e8325a2b38bc8c94f1d853f79 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 struct gb_i2c_device {
        struct gb_connection    *connection;
index 26c59efd9ed8f49f2936aae175752bd202789572..38fe14cf46ceec0c4c89b83cb47724e45c02b350 100644 (file)
@@ -48,32 +48,6 @@ int gb_protocol_get_version(struct gb_connection *connection);
 
 void gb_protocol_put(struct gb_protocol *protocol);
 
-/*
- * These are defined in their respective protocol source files.
- * Declared here for now.  They could be added via modules, or maybe
- * just use initcalls (which level?).
- */
-extern int gb_gpio_protocol_init(void);
-extern void gb_gpio_protocol_exit(void);
-
-extern int gb_pwm_protocol_init(void);
-extern void gb_pwm_protocol_exit(void);
-
-extern int gb_uart_protocol_init(void);
-extern void gb_uart_protocol_exit(void);
-
-extern int gb_sdio_protocol_init(void);
-extern void gb_sdio_protocol_exit(void);
-
-extern int gb_usb_protocol_init(void);
-extern void gb_usb_protocol_exit(void);
-
-extern int gb_i2c_protocol_init(void);
-extern void gb_i2c_protocol_exit(void);
-
-extern int gb_spi_protocol_init(void);
-extern void gb_spi_protocol_exit(void);
-
 /* __protocol: Pointer to struct gb_protocol */
 #define gb_protocol_driver(__protocol)                 \
 static int __init protocol_init(void)                  \
index c3a3a9dfc6b4bba905538ad355bef4fb8709f9c5..018d5c22907091a1eadc22ebfc9c80a418a41956 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/pwm.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 struct gb_pwm_chip {
        struct gb_connection    *connection;
index da9093738d4af723d8ef731cb89aeaa511d47d13..9a20f0e0363dbcd48921d72ee335bf89b7ea8a14 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/workqueue.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 struct gb_sdio_host {
        struct gb_connection    *connection;
index 7689af0f63a952baa756cc3ae5df303f3025cfa3..35714533a1ac674dfa289bd6d6c84b0aec91996b 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/spi/spi.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 struct gb_spi {
        struct gb_connection    *connection;
index 0685cdcb510d300c707abebcf03598d7f04a0d1f..d169c55b455258da2122bcad46b8ad98d8e22e8c 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/kdev_t.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 #define GB_NUM_MINORS  16      /* 16 is is more than enough */
 #define GB_NAME                "ttyGB"
index 6647868b496005374c8cc9bfbb24505e04c293b9..0cfc00f39b462ba2f23d48a8dc55e72a72feb367 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/usb/hcd.h>
 
 #include "greybus.h"
+#include "gpbridge.h"
 
 /* Version of the Greybus USB protocol we support */
 #define GB_USB_VERSION_MAJOR           0x00