summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/greybus/greybus_manifest.h7
-rw-r--r--drivers/staging/greybus/interface.h1
-rw-r--r--drivers/staging/greybus/manifest.c3
3 files changed, 10 insertions, 1 deletions
diff --git a/drivers/staging/greybus/greybus_manifest.h b/drivers/staging/greybus/greybus_manifest.h
index 4f7019011642..28bbadd057d1 100644
--- a/drivers/staging/greybus/greybus_manifest.h
+++ b/drivers/staging/greybus/greybus_manifest.h
@@ -81,6 +81,10 @@ enum greybus_class_type {
GREYBUS_CLASS_VENDOR = 0xff,
};
+enum {
+ GREYBUS_INTERFACE_FEATURE_TIMESYNC = BIT(0),
+};
+
/*
* The string in a string descriptor is not NUL-terminated. The
* size of the descriptor will be rounded up to a multiple of 4
@@ -99,7 +103,8 @@ struct greybus_descriptor_string {
struct greybus_descriptor_interface {
__u8 vendor_stringid;
__u8 product_stringid;
- __u8 pad[2];
+ __u8 features;
+ __u8 pad;
} __packed;
/*
diff --git a/drivers/staging/greybus/interface.h b/drivers/staging/greybus/interface.h
index 1a25234351e2..51772ccdd467 100644
--- a/drivers/staging/greybus/interface.h
+++ b/drivers/staging/greybus/interface.h
@@ -23,6 +23,7 @@ struct gb_interface {
struct list_head manifest_descs;
u8 interface_id; /* Physical location within the Endo */
u8 device_id;
+ u8 features; /* Feature flags set in the manifest */
u32 ddbl1_manufacturer_id;
u32 ddbl1_product_id;
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c
index 886c5fb91d9f..529a984db992 100644
--- a/drivers/staging/greybus/manifest.c
+++ b/drivers/staging/greybus/manifest.c
@@ -398,6 +398,9 @@ static bool gb_manifest_parse_interface(struct gb_interface *intf,
goto out_free_vendor_string;
control->product_string = str;
+ /* Assign feature flags communicated via manifest */
+ intf->features = desc_intf->features;
+
/* Release the interface descriptor, now that we're done with it */
release_manifest_descriptor(interface_desc);