OSDN Git Service

greybus: interface: Get manifest using Control protocol
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 22 Jun 2015 11:12:27 +0000 (16:42 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 24 Jun 2015 06:16:15 +0000 (23:16 -0700)
commit6c68da264b080f749e8848b0227e6bb7d7c72f21
tree9092b29b987a070bf14d925dfd3e10d1bc3821bb
parentcdee4f7505dbb06671a41f63b295d3d7680d760c
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>
drivers/staging/greybus/ap.c
drivers/staging/greybus/bundle.c
drivers/staging/greybus/interface.c
drivers/staging/greybus/interface.h
drivers/staging/greybus/manifest.c