greybus: spi: Restructure spi.c to share it with other bundle drivers

This patch restructures spi.c as spilib core, so that the same logic can
be reused for SPI connections implemented as part of different bundle
types. This is required for Firmware Management Bundle.

Note that the 'struct gb_protocol' and its callback aren't moved to
a separate file in this commit to make its reviews easier. That will be
done by a following patch.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 2680f7e..a9802da 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -33,7 +33,7 @@
 gb-audio-manager-y += audio_manager_module.o
 gb-camera-y := camera.o
 gb-firmware-y := fw-core.o fw-download.o
-gb-spi-y := spi.o
+gb-spilib-y := spilib.o
 gb-sdio-y := sdio.o
 gb-uart-y := uart.o
 gb-pwm-y := pwm.o
@@ -62,7 +62,7 @@
 obj-m += gb-audio-apbridgea.o
 obj-m += gb-audio-manager.o
 obj-m += gb-firmware.o
-obj-m += gb-spi.o
+obj-m += gb-spilib.o
 obj-m += gb-sdio.o
 obj-m += gb-uart.o
 obj-m += gb-pwm.o