Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7b07265 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

greybus: gpbridge.h: move protocol init/exit prototypes



Create gpbridge.h for the gpbridge-specific function prototypes, the
rest of the greybus drivers don't care about them.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
parent 3522a09f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include <linux/device.h>

#include "greybus.h"

#include "gpbridge.h"

static int __init gpbridge_init(void)
{
+34 −0
Original line number Diff line number Diff line
/*
 * 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 */
+1 −0
Original line number Diff line number Diff line
@@ -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 */
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/i2c.h>

#include "greybus.h"
#include "gpbridge.h"

struct gb_i2c_device {
	struct gb_connection	*connection;
+0 −26
Original line number Diff line number Diff line
@@ -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)			\
Loading