#include <linux/device.h>
#include "greybus.h"
-
+#include "gpbridge.h"
static int __init gpbridge_init(void)
{
--- /dev/null
+/*
+ * 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 */
+
#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 */
#include <linux/i2c.h>
#include "greybus.h"
+#include "gpbridge.h"
struct gb_i2c_device {
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) \
#include <linux/pwm.h>
#include "greybus.h"
+#include "gpbridge.h"
struct gb_pwm_chip {
struct gb_connection *connection;
#include <linux/workqueue.h>
#include "greybus.h"
+#include "gpbridge.h"
struct gb_sdio_host {
struct gb_connection *connection;
#include <linux/spi/spi.h>
#include "greybus.h"
+#include "gpbridge.h"
struct gb_spi {
struct gb_connection *connection;
#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"
#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