Create separate module for gpio gpbridge driver.
Tested on EVT 1.5 by inserting GP test module, all the devices were
enumerated correctly.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
sdio.o \
uart.o \
pwm.o \
- gpio.o \
i2c.o \
spi.o \
usb.o
gb-audio-manager-y += audio_manager_module.o
gb-camera-y := camera.o
gb-firmware-y := fw-core.o fw-download.o
+gb-gpio-y := gpio.o
obj-m += greybus.o
obj-m += gb-phy.o
obj-m += gb-audio-apbridgea.o
obj-m += gb-audio-manager.o
obj-m += gb-firmware.o
+obj-m += gb-gpio.o
KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
goto error_gpbridge;
}
- if (gb_gpio_driver_init()) {
- pr_err("error initializing gpio driver\n");
- goto error_gpio;
- }
if (gb_pwm_driver_init()) {
pr_err("error initializing pwm driver\n");
goto error_pwm;
error_uart:
gb_pwm_driver_exit();
error_pwm:
- gb_gpio_driver_exit();
-error_gpio:
greybus_deregister(&gb_gpbridge_driver);
error_gpbridge:
bus_unregister(&gpbridge_bus_type);
gb_sdio_driver_exit();
gb_uart_driver_exit();
gb_pwm_driver_exit();
- gb_gpio_driver_exit();
greybus_deregister(&gb_gpbridge_driver);
bus_unregister(&gpbridge_bus_type);
gb_gpbridge_deregister(&__driver); \
}
-extern int gb_gpio_driver_init(void);
-extern void gb_gpio_driver_exit(void);
-
extern int gb_pwm_driver_init(void);
extern void gb_pwm_driver_exit(void);
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_GPIO) },
{ },
};
+MODULE_DEVICE_TABLE(gpbridge, gb_gpio_id_table);
static struct gpbridge_driver gpio_driver = {
.name = "gpio",
.remove = gb_gpio_remove,
.id_table = gb_gpio_id_table,
};
-gb_gpbridge_builtin_driver(gpio_driver);
+
+module_gpbridge_driver(gpio_driver);
+MODULE_LICENSE("GPL v2");