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

greybus: pwm: Create separate module

Create separate module for pwm gpbridge driver.

Tested on EVT 1.5 by inserting GP test module, all the devices were
enumerated correctly.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent d6046b44
......@@ -17,7 +17,6 @@ greybus-y := core.o \
gb-phy-y := gpbridge.o \
sdio.o \
uart.o \
pwm.o \
spi.o \
usb.o
......@@ -38,6 +37,7 @@ gb-audio-manager-y += audio_manager.o
gb-audio-manager-y += audio_manager_module.o
gb-camera-y := camera.o
gb-firmware-y := fw-core.o fw-download.o
gb-pwm-y := pwm.o
gb-gpio-y := gpio.o
gb-i2c-y := i2c.o
......@@ -62,6 +62,7 @@ obj-m += gb-audio-gb.o
obj-m += gb-audio-apbridgea.o
obj-m += gb-audio-manager.o
obj-m += gb-firmware.o
obj-m += gb-pwm.o
obj-m += gb-gpio.o
obj-m += gb-i2c.o
......
......@@ -317,10 +317,6 @@ static int __init gpbridge_init(void)
goto error_gpbridge;
}
if (gb_pwm_driver_init()) {
pr_err("error initializing pwm driver\n");
goto error_pwm;
}
if (gb_uart_driver_init()) {
pr_err("error initializing uart driver\n");
goto error_uart;
......@@ -347,8 +343,6 @@ static int __init gpbridge_init(void)
error_sdio:
gb_uart_driver_exit();
error_uart:
gb_pwm_driver_exit();
error_pwm:
greybus_deregister(&gb_gpbridge_driver);
error_gpbridge:
bus_unregister(&gpbridge_bus_type);
......@@ -363,7 +357,6 @@ static void __exit gpbridge_exit(void)
gb_usb_driver_exit();
gb_sdio_driver_exit();
gb_uart_driver_exit();
gb_pwm_driver_exit();
greybus_deregister(&gb_gpbridge_driver);
bus_unregister(&gpbridge_bus_type);
......
......@@ -66,9 +66,6 @@ void gb_##__driver##_exit(void) \
gb_gpbridge_deregister(&__driver); \
}
extern int gb_pwm_driver_init(void);
extern void gb_pwm_driver_exit(void);
extern int gb_uart_driver_init(void);
extern void gb_uart_driver_exit(void);
......
......@@ -256,6 +256,7 @@ static const struct gpbridge_device_id gb_pwm_id_table[] = {
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_PWM) },
{ },
};
MODULE_DEVICE_TABLE(gpbridge, gb_pwm_id_table);
static struct gpbridge_driver pwm_driver = {
.name = "pwm",
......@@ -263,4 +264,6 @@ static struct gpbridge_driver pwm_driver = {
.remove = gb_pwm_remove,
.id_table = gb_pwm_id_table,
};
gb_gpbridge_builtin_driver(pwm_driver);
module_gpbridge_driver(pwm_driver);
MODULE_LICENSE("GPL v2");
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