__le16 type; /* enum greybus_descriptor_type */
};
-enum greybus_function_class {
+enum greybus_function_type {
GREYBUS_FUNCTION_CONTROL = 0x00,
GREYBUS_FUNCTION_USB = 0x01,
GREYBUS_FUNCTION_GPIO = 0x02,
};
struct greybus_descriptor_function {
- __le16 number;
__le16 cport;
- __u8 class; /* enum greybus_function_class */
- __u8 subclass;
- __u8 protocol;
- __u8 reserved;
+ __u8 function_type; /* enum greybus_function_type */
};
struct greybus_descriptor_module {
} \
static DEVICE_ATTR_RO(function_##field)
-greybus_function_attr(number);
greybus_function_attr(cport);
-greybus_function_attr(class);
-greybus_function_attr(subclass);
-greybus_function_attr(protocol);
+greybus_function_attr(function_type);
static struct attribute *function_attrs[] = {
- &dev_attr_function_number.attr,
&dev_attr_function_cport.attr,
- &dev_attr_function_class.attr,
- &dev_attr_function_subclass.attr,
- &dev_attr_function_protocol.attr,
+ &dev_attr_function_function_type.attr,
NULL,
};
// FIXME - make this a dynamic structure to "know" if it really is here
// or not easier?
- if (gmod->function.number ||
- gmod->function.cport ||
- gmod->function.class ||
- gmod->function.subclass ||
- gmod->function.protocol)
+ if (gmod->function.cport ||
+ gmod->function.function_type)
return a->mode;
return 0;
}