Commit 15d651b0 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: spi: add bridged-PHY spi protocol driver

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 45a70636
...@@ -15,6 +15,7 @@ gb-phy-y := gpb.o \ ...@@ -15,6 +15,7 @@ gb-phy-y := gpb.o \
pwm.o \ pwm.o \
gpio.o \ gpio.o \
i2c.o \ i2c.o \
spi.o \
usb.o usb.o
# Prefix all modules with gb- # Prefix all modules with gb-
......
...@@ -45,8 +45,14 @@ static int __init gpbridge_init(void) ...@@ -45,8 +45,14 @@ static int __init gpbridge_init(void)
pr_err("error initializing usb protocol\n"); pr_err("error initializing usb protocol\n");
goto error_i2c; goto error_i2c;
} }
if (gb_spi_protocol_init()) {
pr_err("error initializing usb protocol\n");
goto error_spi;
}
return 0; return 0;
error_spi:
gb_i2c_protocol_exit();
error_i2c: error_i2c:
gb_usb_protocol_exit(); gb_usb_protocol_exit();
error_usb: error_usb:
...@@ -63,6 +69,7 @@ static int __init gpbridge_init(void) ...@@ -63,6 +69,7 @@ static int __init gpbridge_init(void)
static void __exit gpbridge_exit(void) static void __exit gpbridge_exit(void)
{ {
gb_spi_protocol_exit();
gb_i2c_protocol_exit(); gb_i2c_protocol_exit();
gb_usb_protocol_exit(); gb_usb_protocol_exit();
gb_sdio_protocol_exit(); gb_sdio_protocol_exit();
......
...@@ -81,6 +81,9 @@ extern void gb_usb_protocol_exit(void); ...@@ -81,6 +81,9 @@ extern void gb_usb_protocol_exit(void);
extern int gb_i2c_protocol_init(void); extern int gb_i2c_protocol_init(void);
extern void gb_i2c_protocol_exit(void); extern void gb_i2c_protocol_exit(void);
extern int gb_spi_protocol_init(void);
extern void gb_spi_protocol_exit(void);
#define gb_protocol_driver(__protocol) \ #define gb_protocol_driver(__protocol) \
static int __init protocol_init(void) \ static int __init protocol_init(void) \
{ \ { \
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment