diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-06-22 16:42:27 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-06-23 23:16:15 -0700 |
commit | 6c68da264b080f749e8848b0227e6bb7d7c72f21 (patch) | |
tree | 9092b29b987a070bf14d925dfd3e10d1bc3821bb /drivers/staging/greybus/bundle.c | |
parent | cdee4f7505dbb06671a41f63b295d3d7680d760c (diff) |
greybus: interface: Get manifest using Control protocol
Control protocol is ready to be used for fetching manifest. Lets do it.
This changes few things:
- Creates/initializes bundle/connection for control protocol initially
and skips doing the same later.
- Manifest is parsed at link-up now, instead of hotplug which was the
case earlier. This is because we need device_id (provided during
link-up) for registering bundle.
- Manifest is fetched using control protocol.
So the sequence of events is:
Event Previously Now
----- ---------- ---
Interface Hotplug create intf create intf
parse mfst
Interface Link Up init bundles create control conn
get mfst size
get mfst
parse mfst
init bundles
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/bundle.c')
-rw-r--r-- | drivers/staging/greybus/bundle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index 8d0e86fc2cfc..a5172e5f64b2 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -230,6 +230,10 @@ int gb_bundle_init(struct gb_bundle *bundle, u8 device_id) struct gb_interface *intf = bundle->intf; int ret; + /* Don't reinitialize control cport's bundle */ + if (intf->control && bundle->id == GB_CONTROL_BUNDLE_ID) + return 0; + bundle->device_id = device_id; ret = svc_set_route_send(bundle, intf->hd); |