mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
This commit is contained in:
parent
3522a09fa7
commit
c7b0726504
10 changed files with 42 additions and 27 deletions
|
@ -17,7 +17,7 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
static int __init gpbridge_init(void)
|
static int __init gpbridge_init(void)
|
||||||
{
|
{
|
||||||
|
|
34
drivers/staging/greybus/gpbridge.h
Normal file
34
drivers/staging/greybus/gpbridge.h
Normal file
|
@ -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 */
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
struct gb_gpio_line {
|
struct gb_gpio_line {
|
||||||
/* The following has to be an array of line_max entries */
|
/* The following has to be an array of line_max entries */
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
struct gb_i2c_device {
|
struct gb_i2c_device {
|
||||||
struct gb_connection *connection;
|
struct gb_connection *connection;
|
||||||
|
|
|
@ -48,32 +48,6 @@ int gb_protocol_get_version(struct gb_connection *connection);
|
||||||
|
|
||||||
void gb_protocol_put(struct gb_protocol *protocol);
|
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 */
|
/* __protocol: Pointer to struct gb_protocol */
|
||||||
#define gb_protocol_driver(__protocol) \
|
#define gb_protocol_driver(__protocol) \
|
||||||
static int __init protocol_init(void) \
|
static int __init protocol_init(void) \
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/pwm.h>
|
#include <linux/pwm.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
struct gb_pwm_chip {
|
struct gb_pwm_chip {
|
||||||
struct gb_connection *connection;
|
struct gb_connection *connection;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
struct gb_sdio_host {
|
struct gb_sdio_host {
|
||||||
struct gb_connection *connection;
|
struct gb_connection *connection;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
struct gb_spi {
|
struct gb_spi {
|
||||||
struct gb_connection *connection;
|
struct gb_connection *connection;
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <linux/kdev_t.h>
|
#include <linux/kdev_t.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
#define GB_NUM_MINORS 16 /* 16 is is more than enough */
|
#define GB_NUM_MINORS 16 /* 16 is is more than enough */
|
||||||
#define GB_NAME "ttyGB"
|
#define GB_NAME "ttyGB"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/usb/hcd.h>
|
#include <linux/usb/hcd.h>
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
#include "gpbridge.h"
|
||||||
|
|
||||||
/* Version of the Greybus USB protocol we support */
|
/* Version of the Greybus USB protocol we support */
|
||||||
#define GB_USB_VERSION_MAJOR 0x00
|
#define GB_USB_VERSION_MAJOR 0x00
|
||||||
|
|
Loading…
Reference in a new issue