Commit 96eab779 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: hid: add HID class driver

This adds HID transport layer driver for Greybus. Most of the stuff is
implemented, but is untested.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b908dec4
...@@ -14,6 +14,7 @@ gb-phy-y := gpb.o \ ...@@ -14,6 +14,7 @@ gb-phy-y := gpb.o \
uart.o \ uart.o \
pwm.o \ pwm.o \
gpio.o \ gpio.o \
hid.o \
i2c.o \ i2c.o \
spi.o \ spi.o \
usb.o usb.o
......
...@@ -49,8 +49,14 @@ static int __init gpbridge_init(void) ...@@ -49,8 +49,14 @@ static int __init gpbridge_init(void)
pr_err("error initializing spi protocol\n"); pr_err("error initializing spi protocol\n");
goto error_spi; goto error_spi;
} }
if (gb_hid_protocol_init()) {
pr_err("error initializing hid protocol\n");
goto error_hid;
}
return 0; return 0;
error_hid:
gb_spi_protocol_exit();
error_spi: error_spi:
gb_i2c_protocol_exit(); gb_i2c_protocol_exit();
error_i2c: error_i2c:
...@@ -69,6 +75,7 @@ static int __init gpbridge_init(void) ...@@ -69,6 +75,7 @@ static int __init gpbridge_init(void)
static void __exit gpbridge_exit(void) static void __exit gpbridge_exit(void)
{ {
gb_hid_protocol_exit();
gb_spi_protocol_exit(); gb_spi_protocol_exit();
gb_i2c_protocol_exit(); gb_i2c_protocol_exit();
gb_usb_protocol_exit(); gb_usb_protocol_exit();
......
This diff is collapsed.
...@@ -84,6 +84,9 @@ extern void gb_i2c_protocol_exit(void); ...@@ -84,6 +84,9 @@ extern void gb_i2c_protocol_exit(void);
extern int gb_spi_protocol_init(void); extern int gb_spi_protocol_init(void);
extern void gb_spi_protocol_exit(void); extern void gb_spi_protocol_exit(void);
extern int gb_hid_protocol_init(void);
extern void gb_hid_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) \
{ \ { \
......
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