summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/module.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-04-01 20:31:58 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-04-05 18:04:38 +0200
commitc9d9d0d443afab6c4c1ce295c283f0caab56db16 (patch)
tree12eccf44252574473a64ff89f9b1529f3769a21b /drivers/staging/greybus/module.c
parent2352a73212a503dfe77970c48a891c008b7edd5b (diff)
greybus: interface: Fetch interface id instead of module id during setup
There can be more than one interface on a module and we need to know the interface for which the event has occurred. But at the same time we may not need the module id at all. During initial phase when AP is probed, the AP will receive the unique Endo id which shall be enough to draw relationships between interface and module ids. Code for that isn't available today and so lets create another routine to get module id (which needs to be fixed separately), which will simply return interface id passed to it. Now that we have interface id, update rest of the code to use it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/module.c')
-rw-r--r--drivers/staging/greybus/module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c
index 538182b60dd9..e8c1c07cff60 100644
--- a/drivers/staging/greybus/module.c
+++ b/drivers/staging/greybus/module.c
@@ -58,6 +58,17 @@ struct device_type greybus_module_type = {
.release = greybus_module_release,
};
+u8 get_module_id(u8 interface_id)
+{
+ /*
+ * FIXME:
+ *
+ * We should be able to find it from Endo ID passed during greybus
+ * control operation, while setting up AP.
+ */
+ return interface_id;
+}
+
static int module_find(struct device *dev, void *data)
{
struct gb_module *module;