greybus: remove unused function descriptor fields and change class->function_type
Greybus spec was updated to remove a number of unused function descriptor fields. In addition, the class field was change to function_type to avoid confusion with the concept of high-level class drivers. Signed-off-by: Matt Porter <mporter@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
4fc645494f
commit
097724c2fb
@ -31,7 +31,7 @@ struct greybus_descriptor_header {
|
||||
__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,
|
||||
@ -49,12 +49,8 @@ enum greybus_function_class {
|
||||
};
|
||||
|
||||
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 {
|
||||
|
@ -31,18 +31,12 @@ static ssize_t function_##field##_show(struct device *dev, \
|
||||
} \
|
||||
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,
|
||||
};
|
||||
|
||||
@ -53,11 +47,8 @@ static umode_t function_attrs_are_visible(struct kobject *kobj,
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user