]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
greybus: loopback: Move loopback operation definitions
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 13 Jul 2015 19:20:45 +0000 (20:20 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 13 Jul 2015 22:42:01 +0000 (15:42 -0700)
In order to have one point of type definition for gbsim move the loopback
operation definitions to greybus_protocols.h.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/loopback.c

index 498f6e9f44d28bd42da36d5f3558a3ba14bc9162..9823d16c3b403b6d4b93e5709adcebc2d1a53512 100644 (file)
@@ -657,6 +657,27 @@ struct gb_uart_serial_state_request {
        __u8    control;
 };
 
+/* Loopback */
+
+/* Version of the Greybus loopback protocol we support */
+#define        GB_LOOPBACK_VERSION_MAJOR               0x00
+#define        GB_LOOPBACK_VERSION_MINOR               0x01
+
+/* Greybus loopback request types */
+#define        GB_LOOPBACK_TYPE_INVALID                0x00
+#define        GB_LOOPBACK_TYPE_PROTOCOL_VERSION       0x01
+#define        GB_LOOPBACK_TYPE_PING                   0x02
+#define        GB_LOOPBACK_TYPE_TRANSFER               0x03
+
+struct gb_loopback_transfer_request {
+       __le32  len;
+       __u8    data[0];
+};
+
+struct gb_loopback_transfer_response {
+       __u8    data[0];
+};
+
 /* SDIO */
 /* Version of the Greybus sdio protocol we support */
 #define GB_SDIO_VERSION_MAJOR          0x00
index eeec3323ad6d4e76f6b7c79615ad113002b93291..59c437bdd58cd11a977d8ef47ea5c3cdd5239d93 100644 (file)
@@ -45,16 +45,6 @@ struct gb_loopback {
        u32 error;
 };
 
-/* Version of the Greybus loopback protocol we support */
-#define        GB_LOOPBACK_VERSION_MAJOR                       0x00
-#define        GB_LOOPBACK_VERSION_MINOR                       0x01
-
-/* Greybus loopback request types */
-#define        GB_LOOPBACK_TYPE_INVALID                        0x00
-#define        GB_LOOPBACK_TYPE_PROTOCOL_VERSION               0x01
-#define        GB_LOOPBACK_TYPE_PING                           0x02
-#define        GB_LOOPBACK_TYPE_TRANSFER                       0x03
-
 /* Current function (type of traffic generated by the loopback thread) */
 #define GB_LOOPBACK_FN_NONE                            0x00
 #define GB_LOOPBACK_FN_PING                            0x01
@@ -175,16 +165,6 @@ static struct attribute *loopback_attrs[] = {
 };
 ATTRIBUTE_GROUPS(loopback);
 
-struct gb_loopback_transfer_request {
-       __le32  len;
-       __u8    data[0];
-};
-
-struct gb_loopback_transfer_response {
-       __u8    data[0];
-};
-
-
 static int gb_loopback_transfer(struct gb_loopback *gb,
                                struct timeval *tping, u32 len)
 {