summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/spi.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2015-05-07 13:03:52 -0500
committerGreg Kroah-Hartman <gregkh@google.com>2015-05-07 22:57:31 +0200
commit6d653370c0a67ff9b9b0d8249182d537859b528c (patch)
treea7522c75f35a67ff55202eddb1b3f61809e551ab /drivers/staging/greybus/spi.c
parent5c58640d8d66504c43c062e6e7d4ed0ade6bde9e (diff)
downloadop-kernel-dev-6d653370c0a67ff9b9b0d8249182d537859b528c.zip
op-kernel-dev-6d653370c0a67ff9b9b0d8249182d537859b528c.tar.gz
greybus: eliminate extra response flag definitions
All protocols use the same value to distinguish between request and response message types. This is a requirement. Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE for the name of the flag used to distiguish between request and response messages. Get rid of the redundant response flag definitions that are associated with specific protocols. Describe the symbolic values as "operation types" rather than "message types" where they are defined. The message type for a request is the same as the operation type; the message type for a response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/spi.c')
-rw-r--r--drivers/staging/greybus/spi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index 639c9cd..731639a 100644
--- a/drivers/staging/greybus/spi.c
+++ b/drivers/staging/greybus/spi.c
@@ -66,7 +66,7 @@ struct gb_spi {
#define GB_SPI_FLAG_NO_RX BIT(1) /* can't do buffer read */
#define GB_SPI_FLAG_NO_TX BIT(2) /* can't do buffer write */
-/* Greybus spi request types */
+/* Greybus spi operation types */
#define GB_SPI_TYPE_INVALID 0x00
#define GB_SPI_TYPE_PROTOCOL_VERSION 0x01
#define GB_SPI_TYPE_MODE 0x02
@@ -74,7 +74,6 @@ struct gb_spi {
#define GB_SPI_TYPE_BITS_PER_WORD_MASK 0x04
#define GB_SPI_TYPE_NUM_CHIPSELECT 0x05
#define GB_SPI_TYPE_TRANSFER 0x06
-#define GB_SPI_TYPE_RESPONSE 0x80 /* OR'd with rest */
/* mode request has no payload */
struct gb_spi_mode_response {
OpenPOWER on IntegriCloud