summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_protocols.h
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2016-02-02 14:23:16 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-05 16:50:20 -0800
commit0273038df61349868d368dd9254eb629425a3378 (patch)
treebe087359de04e60161becd5b176b3b3b7fb5c26e /drivers/staging/greybus/greybus_protocols.h
parent9d4bb6c9183f1283158bbb00ebf65ec4cf18ee33 (diff)
greybus: spi: add device_type field to device config
Add device_type field in device config operation to get the type of device and try to expose less the kernel internal over greybus. This include the spidev, spi-nor will fetch the correct nor id over jede and a modalias that will have the previous behavior (name will set the driver to be loaded). As at it, fix a trivial error path and return immediately. Tested: using gbsim and confirming that a spidev and mtd device were created. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r--drivers/staging/greybus/greybus_protocols.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 89db93282cac..cd64ac84dad2 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -737,6 +737,10 @@ struct gb_spi_device_config_response {
__le16 mode;
__u8 bits_per_word;
__le32 max_speed_hz;
+ __u8 device_type;
+#define GB_SPI_SPI_DEV 0x00
+#define GB_SPI_SPI_NOR 0x01
+#define GB_SPI_SPI_MODALIAS 0x02
__u8 name[32];
} __packed;