diff --git a/drivers/staging/greybus/i2c-gb.c b/drivers/staging/greybus/i2c-gb.c index c4e47effa9f5..e1a0ed9dc6f2 100644 --- a/drivers/staging/greybus/i2c-gb.c +++ b/drivers/staging/greybus/i2c-gb.c @@ -382,9 +382,13 @@ static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev, response = operation->response_payload; if (response->status) { - gb_connection_err(connection, "transfer response %hhu", - response->status); - ret = -EIO; + if (response->status == GB_OP_RETRY) { + ret = -EAGAIN; + } else { + gb_connection_err(connection, "transfer response %hhu", + response->status); + ret = -EIO; + } } else { gb_i2c_transfer_response(msgs, msg_count, response->data); ret = msg_count; diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h index d5ec582e21a2..59aad3a38d17 100644 --- a/drivers/staging/greybus/operation.h +++ b/drivers/staging/greybus/operation.h @@ -16,7 +16,8 @@ enum gb_operation_status { GB_OP_INVALID = 1, GB_OP_NO_MEMORY = 2, GB_OP_INTERRUPTED = 3, - GB_OP_PROTOCOL_BAD = 4, + GB_OP_RETRY = 4, + GB_OP_PROTOCOL_BAD = 5, }; /*