struct gb_spi {
struct gb_connection *connection;
- u8 version_major;
- u8 version_minor;
/* Modes supported by spi controller */
u16 mode;
/* Routines to get controller infomation */
-/* Define get_version() routine */
-define_get_version(gb_spi, SPI);
-
/*
* Map Greybus spi mode bits/flags/bpw into Linux ones.
* All bits are same for now and so these macro's return same values.
{
int ret;
- /* First thing we need to do is check the version */
- ret = get_version(spi);
- if (ret)
- return ret;
-
/* mode never changes, just get it once */
ret = gb_spi_mode_operation(spi);
if (ret)