cports: add support for tracking cport<->protocol and exec a handler

Previously, we just called the i2c subdev handler regardless of what
traffic was arriving on the cport out endpoint. In order to support
arbitrary configurations of virtual modules and subdev handlers, we
now parse the manifest for cports and keep track of what cports and
protocols are supported on a module. Using this information, we
dispatch the appropriate subdev handler for a protocol used on a cport
when we inspect the incoming cport targetted packet from the AP.

Signed-off-by: Matt Porter <mporter@linaro.org>
svc: change ap_device_id messages to ap_id

The data payload of the ap_device_id message was exptended to include
the module id. The name was changed so adjust to match the greybus
spec and kernel greybus support.

Signed-off-by: Matt Porter <mporter@linaro.org>
gpio: Add soft gpio protocol handler

Add a software debug gpio protocol handler. This implements
a 4 line gpio device for all modules with cports claiming
gpio protocol support.

This will be extended with optional BeagleBone backend support
to access h/w gpios via the sysfs userspace interface.

Signed-off-by: Matt Porter <mporter@linaro.org>
i2c: bury the BBB specific i2c-dev init under the cmdline option

Only init i2c-dev if the BBB backend is engaged.

Signed-off-by: Matt Porter <mporter@linaro.org>
i2c: remove dependency on the i2c-tools version of i2c-dev

That i2c-dev.h is a source of so much pain. Kill it off and use the
very sane kernel header that works perfectly fine.

Signed-off-by: Matt Porter <mporter@linaro.org>