}
static struct gb_protocol battery_protocol = {
+ .name = "battery",
.id = GREYBUS_PROTOCOL_BATTERY,
.major = 0,
.minor = 1,
}
static struct gb_protocol gpio_protocol = {
+ .name = "gpio",
.id = GREYBUS_PROTOCOL_GPIO,
.major = 0,
.minor = 1,
}
static struct gb_protocol i2c_protocol = {
+ .name = "i2c",
.id = GREYBUS_PROTOCOL_I2C,
.major = 0,
.minor = 1,
* Released under the GPLv2 only.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "greybus.h"
/* Global list of registered protocols */
list_add_tail(&protocol->links, &existing->links);
spin_unlock_irq(&gb_protocols_lock);
+ pr_info("Registered %s protocol.\n", protocol->name);
+
/*
* Go try to bind any unbound connections, as we have a
* new protocol in the system
}
spin_unlock_irq(&gb_protocols_lock);
+ if (protocol)
+ pr_info("Deregistered %s protocol.\n", protocol->name);
+
return protocol && !protocol_count;
}
EXPORT_SYMBOL_GPL(gb_protocol_deregister);
gb_connection_exit_t connection_exit;
gb_request_recv_t request_recv;
struct module *owner;
+ char *name;
};
int __gb_protocol_register(struct gb_protocol *protocol, struct module *module);
}
static struct gb_protocol pwm_protocol = {
+ .name = "pwm",
.id = GREYBUS_PROTOCOL_PWM,
.major = 0,
.minor = 1,
}
static struct gb_protocol sdio_protocol = {
+ .name = "sdio",
.id = GREYBUS_PROTOCOL_SDIO,
.major = 0,
.minor = 1,
}
static struct gb_protocol uart_protocol = {
+ .name = "uart",
.id = GREYBUS_PROTOCOL_UART,
.major = 0,
.minor = 1,
}
static struct gb_protocol usb_protocol = {
+ .name = "usb",
.id = GREYBUS_PROTOCOL_USB,
.major = 0,
.minor = 1,
}
static struct gb_protocol vibrator_protocol = {
+ .name = "vibrator",
.id = GREYBUS_PROTOCOL_VIBRATOR,
.major = 0,
.minor = 1,