From: Greg Kroah-Hartman Date: Tue, 4 Aug 2015 03:06:10 +0000 (-0700) Subject: greybus: Merge branch 'master' into svc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f69e5990f66818bd5bdb90a51df0cca2505c1bc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: Merge branch 'master' into svc Handle some merge conflicts in greybus_protocols.h due to changes on the same structure in both branches. Signed-off-by: Greg Kroah-Hartman --- 7f69e5990f66818bd5bdb90a51df0cca2505c1bc diff --cc drivers/staging/greybus/greybus_protocols.h index e2d38dfe06b6,290b85f6ff68..2db6af9cda40 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@@ -64,13 -64,42 +64,42 @@@ * CONTROL and SVC protocols for communication between AP and SVC. */ #define GB_SVC_BUNDLE_ID 0 -#define GB_SVC_CPORT_ID 2 +#define GB_SVC_CPORT_ID 0 #define GB_CONTROL_BUNDLE_ID 0 -#define GB_CONTROL_CPORT_ID 2 +#define GB_CONTROL_CPORT_ID 0 - /* Control Protocol */ + /* + * All operation messages (both requests and responses) begin with + * a header that encodes the size of the message (header included). + * This header also contains a unique identifier, that associates a + * response message with its operation. The header contains an + * operation type field, whose interpretation is dependent on what + * type of protocol is used over the connection. The high bit + * (0x80) of the operation type field is used to indicate whether + * the message is a request (clear) or a response (set). + * + * Response messages include an additional result byte, which + * communicates the result of the corresponding request. A zero + * result value means the operation completed successfully. Any + * other value indicates an error; in this case, the payload of the + * response message (if any) is ignored. The result byte must be + * zero in the header for a request message. + * + * The wire format for all numeric fields in the header is little + * endian. Any operation-specific data begins immediately after the + * header. + */ + struct gb_operation_msg_hdr { + __le16 size; /* Size in bytes of header + payload */ + __le16 operation_id; /* Operation unique id */ + __u8 type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */ + __u8 result; /* Result of request (in responses only) */ + __u8 pad[2]; /* must be zero (ignore when read) */ + }; + + /* Control Protocol */ /* version request has no payload */ struct gb_protocol_version_response { @@@ -606,9 -634,7 +635,9 @@@ struct gb_svc_conn_create_request __u16 cport1_id; __u8 intf2_id; __u16 cport2_id; + __u8 tc; + __u8 flags; - }; + } __packed; /* connection create response has no payload */ struct gb_svc_conn_destroy_request { @@@ -616,16 -642,9 +645,16 @@@ __u16 cport1_id; __u8 intf2_id; __u16 cport2_id; - }; + } __packed; /* connection destroy response has no payload */ +struct gb_svc_route_create_request { + __u8 intf1_id; + __u8 dev1_id; + __u8 intf2_id; + __u8 dev2_id; +}; + /* UART */ /* Version of the Greybus UART protocol we support */