summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/greybus/gpbridge.h5
-rw-r--r--drivers/staging/greybus/hid.c3
-rw-r--r--drivers/staging/greybus/operation.c8
-rw-r--r--drivers/staging/greybus/operation.h2
-rw-r--r--drivers/staging/greybus/spi.c3
-rw-r--r--drivers/staging/greybus/uart.c3
-rw-r--r--drivers/staging/greybus/vibrator.c3
7 files changed, 10 insertions, 17 deletions
diff --git a/drivers/staging/greybus/gpbridge.h b/drivers/staging/greybus/gpbridge.h
index e2301888a322..85d801960564 100644
--- a/drivers/staging/greybus/gpbridge.h
+++ b/drivers/staging/greybus/gpbridge.h
@@ -65,7 +65,6 @@
#define GB_I2C_TYPE_TIMEOUT 0x03
#define GB_I2C_TYPE_RETRIES 0x04
#define GB_I2C_TYPE_TRANSFER 0x05
-#define GB_I2C_TYPE_RESPONSE 0x80 /* OR'd with rest */
#define GB_I2C_RETRIES_DEFAULT 3
#define GB_I2C_TIMEOUT_DEFAULT 1000 /* milliseconds */
@@ -133,7 +132,6 @@ struct gb_i2c_transfer_response {
#define GB_GPIO_TYPE_IRQ_MASK 0x0d
#define GB_GPIO_TYPE_IRQ_UNMASK 0x0e
#define GB_GPIO_TYPE_IRQ_EVENT 0x0f
-#define GB_GPIO_TYPE_RESPONSE 0x80 /* OR'd with rest */
#define GB_GPIO_DEBOUNCE_USEC_DEFAULT 0 /* microseconds */
@@ -223,7 +221,7 @@ struct gb_gpio_irq_event_request {
#define GB_PWM_VERSION_MAJOR 0x00
#define GB_PWM_VERSION_MINOR 0x01
-/* Greybus PWM request types */
+/* Greybus PWM operation types */
#define GB_PWM_TYPE_INVALID 0x00
#define GB_PWM_TYPE_PROTOCOL_VERSION 0x01
#define GB_PWM_TYPE_PWM_COUNT 0x02
@@ -233,7 +231,6 @@ struct gb_gpio_irq_event_request {
#define GB_PWM_TYPE_POLARITY 0x06
#define GB_PWM_TYPE_ENABLE 0x07
#define GB_PWM_TYPE_DISABLE 0x08
-#define GB_PWM_TYPE_RESPONSE 0x80 /* OR'd with rest */
/* pwm count request has no payload */
struct gb_pwm_count_response {
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
index 556cf9b0fe93..00dc7e57f4a4 100644
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -20,7 +20,7 @@
#define GB_HID_VERSION_MAJOR 0x00
#define GB_HID_VERSION_MINOR 0x01
-/* Greybus HID request types */
+/* Greybus HID operation types */
#define GB_HID_TYPE_INVALID 0x00
#define GB_HID_TYPE_PROTOCOL_VERSION 0x01
#define GB_HID_TYPE_GET_DESC 0x02
@@ -30,7 +30,6 @@
#define GB_HID_TYPE_GET_REPORT 0x06
#define GB_HID_TYPE_SET_REPORT 0x07
#define GB_HID_TYPE_IRQ_EVENT 0x08
-#define GB_HID_TYPE_RESPONSE 0x80 /* OR'd with rest */
/* Report type */
#define GB_HID_INPUT_REPORT 0
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index 3639e27e288a..1ec930c5cba9 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -396,7 +396,7 @@ bool gb_operation_response_alloc(struct gb_operation *operation,
struct gb_message *response;
u8 type;
- type = operation->type | GB_OPERATION_TYPE_RESPONSE;
+ type = operation->type | GB_MESSAGE_TYPE_RESPONSE;
response = gb_operation_message_alloc(hd, type, response_size,
GFP_KERNEL);
if (!response)
@@ -508,8 +508,8 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
{
if (WARN_ON_ONCE(type == GB_OPERATION_TYPE_INVALID))
return NULL;
- if (WARN_ON_ONCE(type & GB_OPERATION_TYPE_RESPONSE))
- type &= ~GB_OPERATION_TYPE_RESPONSE;
+ if (WARN_ON_ONCE(type & GB_MESSAGE_TYPE_RESPONSE))
+ type &= ~GB_MESSAGE_TYPE_RESPONSE;
return gb_operation_create_common(connection, type,
request_size, response_size);
@@ -855,7 +855,7 @@ void gb_connection_recv(struct gb_connection *connection,
}
operation_id = le16_to_cpu(header.operation_id);
- if (header.type & GB_OPERATION_TYPE_RESPONSE)
+ if (header.type & GB_MESSAGE_TYPE_RESPONSE)
gb_connection_recv_response(connection, operation_id,
header.result, data, msg_size);
else
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index 38684f2cdbaa..82b8fe57f8a0 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -24,7 +24,7 @@ struct gb_operation;
* The top bit of the type in an operation message header indicates
* whether the message is a request (bit clear) or response (bit set)
*/
-#define GB_OPERATION_TYPE_RESPONSE ((u8)0x80)
+#define GB_MESSAGE_TYPE_RESPONSE ((u8)0x80)
enum gb_operation_result {
GB_OP_SUCCESS = 0x00,
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index 639c9cdac516..731639a810b2 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 {
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 51e4f7bad47f..35ab3cad5714 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -37,7 +37,7 @@
#define GB_UART_VERSION_MAJOR 0x00
#define GB_UART_VERSION_MINOR 0x01
-/* Greybus UART request types */
+/* Greybus UART operation types */
#define GB_UART_TYPE_INVALID 0x00
#define GB_UART_TYPE_PROTOCOL_VERSION 0x01
#define GB_UART_TYPE_SEND_DATA 0x02
@@ -46,7 +46,6 @@
#define GB_UART_TYPE_SET_CONTROL_LINE_STATE 0x05
#define GB_UART_TYPE_SET_BREAK 0x06
#define GB_UART_TYPE_SERIAL_STATE 0x07 /* Unsolicited data */
-#define GB_UART_TYPE_RESPONSE 0x80 /* OR'd with rest */
struct gb_uart_send_data_request {
__le16 size;
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 2943a9b381c6..aefd2cd3f18e 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -27,12 +27,11 @@ struct gb_vibrator_device {
#define GB_VIBRATOR_VERSION_MAJOR 0x00
#define GB_VIBRATOR_VERSION_MINOR 0x01
-/* Greybus Vibrator request types */
+/* Greybus Vibrator operation types */
#define GB_VIBRATOR_TYPE_INVALID 0x00
#define GB_VIBRATOR_TYPE_PROTOCOL_VERSION 0x01
#define GB_VIBRATOR_TYPE_ON 0x02
#define GB_VIBRATOR_TYPE_OFF 0x03
-#define GB_VIBRATOR_TYPE_RESPONSE 0x80 /* OR'd with rest */
struct gb_vibrator_on_request {
__le16 timeout_ms;