#ifndef __GREYBUS_MANIFEST_H
#define __GREYBUS_MANIFEST_H
-#pragma pack(push, 1)
-
enum greybus_descriptor_type {
GREYBUS_TYPE_INVALID = 0x00,
GREYBUS_TYPE_INTERFACE = 0x01,
__u8 length;
__u8 id;
__u8 string[0];
-};
+} __packed;
/*
* An interface descriptor describes information about an interface as a whole,
__u8 vendor_stringid;
__u8 product_stringid;
__le64 unique_id;
-};
+} __packed;
/*
* An bundle descriptor defines an identification number and a class for
struct greybus_descriptor_bundle {
__u8 id; /* interface-relative id (0..) */
__u8 class;
-};
+} __packed;
/*
* A CPort descriptor indicates the id of the bundle within the
__u8 bundle;
__le16 id;
__u8 protocol_id; /* enum greybus_protocol */
-};
+} __packed;
/*
* A class descriptor defines functionality supplied by a module.
*/
struct greybus_descriptor_class {
__u8 class; /* enum greybus_class_type */
-};
+} __packed;
struct greybus_descriptor_header {
__le16 size;
__u8 type; /* enum greybus_descriptor_type */
-};
+} __packed;
struct greybus_descriptor {
struct greybus_descriptor_header header;
struct greybus_descriptor_cport cport;
struct greybus_descriptor_class class;
};
-};
+} __packed;
struct greybus_manifest_header {
__le16 size;
__u8 version_major;
__u8 version_minor;
-};
+} __packed;
struct greybus_manifest {
struct greybus_manifest_header header;
struct greybus_descriptor descriptors[0];
-};
-
-#pragma pack(pop)
+} __packed;
#endif /* __GREYBUS_MANIFEST_H */
#ifndef __SVC_MSG_H
#define __SVC_MSG_H
-#pragma pack(push, 1)
-
enum svc_function_id {
SVC_FUNCTION_HANDSHAKE = 0x00,
SVC_FUNCTION_UNIPRO_NETWORK_MANAGEMENT = 0x01,
__u8 function_id; /* enum svc_function_id */
__u8 message_type;
__le16 payload_length;
-};
+} __packed;
enum svc_function_handshake_type {
SVC_HANDSHAKE_SVC_HELLO = 0x00,
__u8 version_major;
__u8 version_minor;
__u8 handshake_type; /* enum svc_function_handshake_type */
-};
+} __packed;
struct svc_function_unipro_set_route {
__u8 device_id;
-};
+} __packed;
struct svc_function_unipro_link_up {
__u8 interface_id; /* Interface id within the Endo */
__u8 device_id;
-};
+} __packed;
struct svc_function_ap_id {
__u8 interface_id;
__u8 device_id;
-};
+} __packed;
enum svc_function_management_event {
SVC_MANAGEMENT_AP_ID = 0x00,
struct svc_function_unipro_link_up link_up;
struct svc_function_unipro_set_route set_route;
};
-};
+} __packed;
enum svc_function_hotplug_event {
SVC_HOTPLUG_EVENT = 0x00,
__u8 hotplug_event; /* enum svc_function_hotplug_event */
__u8 interface_id; /* Interface id within the Endo */
__u8 data[0];
-};
+} __packed;
enum svc_function_power_type {
SVC_POWER_BATTERY_STATUS = 0x00,
__le16 charge_full;
__le16 charge_now;
__u8 status; /* enum svc_function_battery_status */
-};
+} __packed;
struct svc_function_power_battery_status_request {
-};
+} __packed;
/* XXX
* Each interface carries power, so it's possible these things
struct svc_function_power_battery_status status;
struct svc_function_power_battery_status_request request;
};
-};
+} __packed;
enum svc_function_epm_command_type {
SVC_EPM_ENABLE = 0x00,
struct svc_function_epm {
__u8 epm_command_type; /* enum svc_function_epm_command_type */
__u8 module_id;
-};
+} __packed;
enum svc_function_suspend_command_type {
SVC_SUSPEND_FIXME_1 = 0x00, // FIXME
struct svc_function_suspend {
__u8 suspend_command_type; /* enum function_suspend_command_type */
__u8 device_id;
-};
+} __packed;
struct svc_msg {
struct svc_msg_header header;
struct svc_function_epm epm;
struct svc_function_suspend suspend;
};
-};
-
-#pragma pack(pop)
+} __packed;
#endif /* __SVC_MSG_H */