greybus: manifest: Use interface descriptor instead of module descriptor to get information
A module can have more than one interfaces and we get hotplug events or
manifests for interfaces, not modules. Details like version, vendor,
product id, etc. can be different for different interfaces within the
same module and so shall be fetched from interface descriptor instead of
module descriptor.
So what we have been doing for module descriptors until now must be done
for interface descriptors. There can only be one interface descriptor in
the manifest. Module descriptor isn't used anymore and probably most of
its fields can be removed now.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/greybus_manifest.h b/drivers/staging/greybus/greybus_manifest.h
index 96702f4..143e284 100644
--- a/drivers/staging/greybus/greybus_manifest.h
+++ b/drivers/staging/greybus/greybus_manifest.h
@@ -1,5 +1,5 @@
/*
- * Greybus module manifest definition
+ * Greybus manifest definition
*
* See "Greybus Application Protocol" document (version 0.1) for
* details on these values and structures.
@@ -94,19 +94,16 @@
};
/*
- * An interface descriptor simply defines a module-unique id for
- * each interface present on a module. Its sole purpose is to allow
- * CPort descriptors to specify which interface they are associated
- * with. Normally there's only one interface, with id 0. The
- * second one must have id 1, and so on consecutively.
- *
- * The largest CPort id associated with an interface (defined by a
- * CPort descriptor in the manifest) is used to determine how to
- * encode the device id and module number in UniPro packets
- * that use the interface.
+ * An interface descriptor describes information about an interface as a whole,
+ * *not* the functions within it.
*/
struct greybus_descriptor_interface {
- __u8 id; /* module-relative id (0..) */
+ __le16 vendor;
+ __le16 product;
+ __le16 version; // TODO - remove after Dec demo.
+ __u8 vendor_stringid;
+ __u8 product_stringid;
+ __le64 unique_id;
};
/*