mirror of https://gitee.com/openkylin/linux.git
greybus: sdio: Create separate module
Create separate module for sdio 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>
This commit is contained in:
parent
dca8060db8
commit
3d64730e11
|
@ -15,7 +15,6 @@ greybus-y := core.o \
|
||||||
legacy.o
|
legacy.o
|
||||||
|
|
||||||
gb-phy-y := gpbridge.o \
|
gb-phy-y := gpbridge.o \
|
||||||
sdio.o \
|
|
||||||
uart.o \
|
uart.o \
|
||||||
spi.o \
|
spi.o \
|
||||||
usb.o
|
usb.o
|
||||||
|
@ -37,6 +36,7 @@ gb-audio-manager-y += audio_manager.o
|
||||||
gb-audio-manager-y += audio_manager_module.o
|
gb-audio-manager-y += audio_manager_module.o
|
||||||
gb-camera-y := camera.o
|
gb-camera-y := camera.o
|
||||||
gb-firmware-y := fw-core.o fw-download.o
|
gb-firmware-y := fw-core.o fw-download.o
|
||||||
|
gb-sdio-y := sdio.o
|
||||||
gb-pwm-y := pwm.o
|
gb-pwm-y := pwm.o
|
||||||
gb-gpio-y := gpio.o
|
gb-gpio-y := gpio.o
|
||||||
gb-i2c-y := i2c.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-apbridgea.o
|
||||||
obj-m += gb-audio-manager.o
|
obj-m += gb-audio-manager.o
|
||||||
obj-m += gb-firmware.o
|
obj-m += gb-firmware.o
|
||||||
|
obj-m += gb-sdio.o
|
||||||
obj-m += gb-pwm.o
|
obj-m += gb-pwm.o
|
||||||
obj-m += gb-gpio.o
|
obj-m += gb-gpio.o
|
||||||
obj-m += gb-i2c.o
|
obj-m += gb-i2c.o
|
||||||
|
|
|
@ -321,10 +321,6 @@ static int __init gpbridge_init(void)
|
||||||
pr_err("error initializing uart driver\n");
|
pr_err("error initializing uart driver\n");
|
||||||
goto error_uart;
|
goto error_uart;
|
||||||
}
|
}
|
||||||
if (gb_sdio_driver_init()) {
|
|
||||||
pr_err("error initializing sdio driver\n");
|
|
||||||
goto error_sdio;
|
|
||||||
}
|
|
||||||
if (gb_usb_driver_init()) {
|
if (gb_usb_driver_init()) {
|
||||||
pr_err("error initializing usb driver\n");
|
pr_err("error initializing usb driver\n");
|
||||||
goto error_usb;
|
goto error_usb;
|
||||||
|
@ -339,8 +335,6 @@ static int __init gpbridge_init(void)
|
||||||
error_spi:
|
error_spi:
|
||||||
gb_usb_driver_exit();
|
gb_usb_driver_exit();
|
||||||
error_usb:
|
error_usb:
|
||||||
gb_sdio_driver_exit();
|
|
||||||
error_sdio:
|
|
||||||
gb_uart_driver_exit();
|
gb_uart_driver_exit();
|
||||||
error_uart:
|
error_uart:
|
||||||
greybus_deregister(&gb_gpbridge_driver);
|
greybus_deregister(&gb_gpbridge_driver);
|
||||||
|
@ -355,7 +349,6 @@ static void __exit gpbridge_exit(void)
|
||||||
{
|
{
|
||||||
gb_spi_driver_exit();
|
gb_spi_driver_exit();
|
||||||
gb_usb_driver_exit();
|
gb_usb_driver_exit();
|
||||||
gb_sdio_driver_exit();
|
|
||||||
gb_uart_driver_exit();
|
gb_uart_driver_exit();
|
||||||
|
|
||||||
greybus_deregister(&gb_gpbridge_driver);
|
greybus_deregister(&gb_gpbridge_driver);
|
||||||
|
|
|
@ -69,9 +69,6 @@ void gb_##__driver##_exit(void) \
|
||||||
extern int gb_uart_driver_init(void);
|
extern int gb_uart_driver_init(void);
|
||||||
extern void gb_uart_driver_exit(void);
|
extern void gb_uart_driver_exit(void);
|
||||||
|
|
||||||
extern int gb_sdio_driver_init(void);
|
|
||||||
extern void gb_sdio_driver_exit(void);
|
|
||||||
|
|
||||||
extern int gb_usb_driver_init(void);
|
extern int gb_usb_driver_init(void);
|
||||||
extern void gb_usb_driver_exit(void);
|
extern void gb_usb_driver_exit(void);
|
||||||
|
|
||||||
|
|
|
@ -827,6 +827,7 @@ static const struct gpbridge_device_id gb_sdio_id_table[] = {
|
||||||
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_SDIO) },
|
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_SDIO) },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
MODULE_DEVICE_TABLE(gpbridge, gb_sdio_id_table);
|
||||||
|
|
||||||
static struct gpbridge_driver sdio_driver = {
|
static struct gpbridge_driver sdio_driver = {
|
||||||
.name = "sdio",
|
.name = "sdio",
|
||||||
|
@ -834,4 +835,6 @@ static struct gpbridge_driver sdio_driver = {
|
||||||
.remove = gb_sdio_remove,
|
.remove = gb_sdio_remove,
|
||||||
.id_table = gb_sdio_id_table,
|
.id_table = gb_sdio_id_table,
|
||||||
};
|
};
|
||||||
gb_gpbridge_builtin_driver(sdio_driver);
|
|
||||||
|
module_gpbridge_driver(sdio_driver);
|
||||||
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|
Loading…
Reference in New Issue