summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/greybus_manifest.h
diff options
context:
space:
mode:
authorAlexandre Bailon <abailon@baylibre.com>2015-03-31 10:51:59 +0300
committerGreg Kroah-Hartman <greg@kroah.com>2015-03-31 23:53:59 +0300
commit355a7058153e04b53bed3fcb792110294693d386 (patch)
tree9b33de7118f8ae28d5fe10de4b6791a37bc51f13 /drivers/staging/greybus/greybus_manifest.h
parente0feaf14b102f767d00ee28443f8443e4d76ba8b (diff)
downloadlinux-355a7058153e04b53bed3fcb792110294693d386.tar.xz
greybus: Add loopback protocol
Add a simple Greybus protocol in order to stress USB and Greybus. This protocol currently support 2 requests: ping and transfer. ping request is useful to measure latency. Kernel send a ping request and firmware should respond with a ping. The transfer request request is useful to stress Greybus and USB. Kernel can send data from 0 to 4k and the firmware must send back the data to kernel. This behaviour of gb-loopback module is controlled via sysfs. Curently, connection sysfs folder is updated with new entries: - type: Type of loopback message to send * 0 => Don't send message * 1 => Send ping message continuously (message without payload) * 2 => Send transer message continuously (message with payload) - size: Size of transfer message payload: 0-4096 bytes - ms_wait: Time to wait between two messages: 0-1024 ms Module also export some statistics about connection: - latency: Time to send and receive one message - frequency: Number of packet sent per second on this cport - throughput: Quantity of data sent and received on this cport - error All this statistics are cleared everytime type, size or ms_wait entries are updated. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_manifest.h')
-rw-r--r--drivers/staging/greybus/greybus_manifest.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_manifest.h b/drivers/staging/greybus/greybus_manifest.h
index 398630ce8ac4..4b2cf9220843 100644
--- a/drivers/staging/greybus/greybus_manifest.h
+++ b/drivers/staging/greybus/greybus_manifest.h
@@ -42,6 +42,7 @@ enum greybus_protocol {
GREYBUS_PROTOCOL_SENSOR = 0x0e,
GREYBUS_PROTOCOL_LED = 0x0f,
GREYBUS_PROTOCOL_VIBRATOR = 0x10,
+ GREYBUS_PROTOCOL_LOOPBACK = 0x11,
/* ... */
GREYBUS_PROTOCOL_VENDOR = 0xff,
};