1
0
Fork 0
Commit Graph

177 Commits (accad1ba7d62543ab3bcf08813726ea87d237bb6)

Author SHA1 Message Date
Johan Hovold 4e6e3f5cff greybus: connection: fix version-request error handling
Use the host device and connection name when logging errors as the
version-request helper must not assume that all connection have a
bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-09 00:41:46 -08:00
Johan Hovold 100e900008 greybus: use decimal notation for interfaces, bundles and cports
Fix up the last few places where hexadecimal rather than decimal
notation was used for interface, bundle and cport ids.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 2c848944c1 greybus: hd: make svc-connection life time coincide with host-device
Create the svc-connection as part of the host device, and destroy it in
the host-device destructor.

The svc-connection is enabled when registering the host device, and
disabled when the host device is deregistered.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 0bf1f24419 greybus: connection: separate connection creation and enabling
Separate connection creation from enabling.

This will ultimately allow connection structures to be created while
parsing manifests, but the connections to not be enabled until a driver
is bound.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 3617311235 greybus: connection: unbind protocol at exit
Unbind protocol at connection exit rather than when the connection is
destroyed.

Now a protocol is only bound while a connection is enabled.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 30c2de77ae greybus: connection: bind protocol at init
Bind protocol at connection init.

This is an intermediate step in separating connection creation and
enabling.

Note that the protocol is currently still unbound when the connection is
destroyed.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 74c8316533 greybus: connection: fail on missing protocol
Make sure to fail properly when a protocol is missing.

This prevents the connection from being created, which is fine as we
currently never bind protocols post creation.

This is an intermediate step in moving protocol binding to
connection_init.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Johan Hovold 2d54e4db4e greybus: bundle: kill gb_bundle_bind_protocols
Remove gb_bundle_bind_protocols() that was used to iterate over all
registered bundles and bind protocols to them should a protocol become
available post bundle creation.

The protocol abstraction as a generic construct is going away in favour
of class drivers. Connections will be setup when a class driver is
probed, and driver modules can be loaded on-demand by user space based
on uevents and modalias.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-08 15:31:14 -05:00
Viresh Kumar 2f3db927cd greybus: don't use %h and %hh for printing short and char variables
Because the width of our fields is already known, we can use %0Nx (for
hex) to print N bytes and %u (for unsigned decimal), instead of using %h
and %hh, which isn't that readable.

This patch makes following changes:
- s/%hx/%04x
- s/%04hx/%04x
- s/%hhx/%02x
- s/%02hhx/%02x
- s/%hhu/%u
- s/%hu/%u
- s/%x/%02x for u8 value (only at a single place)

Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-04 16:23:36 -08:00
Johan Hovold e1442f6910 greybus: connection: unconditionally enable connections
Remove conditional enabling of connections when binding protocols that
served no purpose as a connection either has no bundle or it has an
interface with a valid device id.

Also remove the now unused GB_PROTOCOL_NO_BUNDLE protocol flag.

This is an intermediate step in moving the protocol binding to
connection_init, but is also needed as the control bundle is going away.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold 35822c04a5 greybus: connection: handle bundle-less connections in svc helpers
The svc connection helper functions should not assume that all dynamic
connections will have a bundle.

This is needed as the control bundle is going away.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold 5ef323846f greybus: hd: fix svc-connection handling
Create the svc connection when registering the host-device and
remove the current svc connection hacks that "upgraded" the svc
connection once the endo id and ap interface id was known.

Note that the old implementation was partly based on a misunderstanding
as it was the remote interface id, rather than the local AP interface id,
that used to define a connection (but we also needed the endo_id).

The remote interface is no longer needed as static connections, such as
the svc connection, are now simply defined by the host-device and host
cport id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 4c4b502186 greybus: connection: handle static connections
Use host-device device and connection name for log messages rather than
assume that all connections have a bundle (e.g. not true for static
connections).

Note that the "initial" svc connection has never had a bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 729b260a67 greybus: connection: add name field
Add a name field to connections that can be used in log messages.

A connection always belongs to a host-device (bus) and can be uniquely
identified by its host-device cport id, but include remote interface and
cport id nonetheless on the following format:

	<hd_cport_id>/<intf_id>:<cport_id>

The remote interface and cport id will be zero for static connections.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 4ec1574ae9 greybus: connection: kill GB_PROTOCOL_SKIP_SVC_CONNECTION
Add helper to determine whether a connection is static, and remove the
protocol flag GB_PROTOCOL_SKIP_SVC_CONNECTION.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 0daf17b9e4 greybus: connection: fix potential null-deref on create
Make sure that the interface lookup helper can handle static,
bundle-less connections without oopsing when creating further
connections.

Note that the initial svc-connection has always been bundle-less, but
did not trigger an oops as a bundle was created for it before further
connections were created.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 2566fae6a5 greybus: connection: clean up connection-creation interface
Clean up the connection-creation interface by clearly separating our two
types of connections: static and dynamic.

Add two convenience functions for creating static and dynamic connections.

A static connection is a pre-setup connection that is defined by a host
device and a host-device cport id. Specifically, the remote interface or
cport id need not be known. The SVC connection is a static connection.

A dynamic connection is defined by a host device and a remote interface
and cport id. This is our normal connections where the host-device cport
is (generally) allocated dynamically.

Note that the new generic interface is marked static, but can be
exported later to allow dynamic connections to be created also from
fixed host-device cports (e.g. for CSI).

Also note that a connection of either type is uniquely identified by its
host-device and host-device cport id once created.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 66069fb06c greybus: svc: move endo id and ap interface id to svc
Move endo_id and AP interface id to the svc device.

The endo abstraction is about to be removed, and these attributes are
arguable attributes of the svc anyway.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold 582b3a1392 greybus: connection: drop parent parameter from connection create
The parent parameter was only used for debug messages and to name the
connection workqueue. Use the host-device device for this instead.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:27:06 -08:00
Johan Hovold 2adaefb145 greybus: hd: make host device a device
Make the host device a proper device in the kernel device model.

Host devices will be our new greybus-bus root devices.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:27:06 -08:00
Johan Hovold 39f36c8f9f greybus: connection: fix cport-id range
Fix cport-id allocation that failed to include the highest port id in the
available cport-id range.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-23 19:23:27 -08:00
Johan Hovold 2537636aba greybus: hd: rename host-device structure
Rename host-device structure gb_host_device to match our other
structures.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:25:57 -08:00
Johan Hovold fcfc762f17 greybus: connection: kill gb_hd_connections_exit
Connections are destroyed as part of interface tear down. If we fail to
do that properly it's a bug that should be fixed rather than papered
over by a fall-back clean up function.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:20:23 -08:00
Johan Hovold 5245a90564 greybus: connection: fix potential null-deref when binding protocol
We can have connections without bundles so we must not use the bundle
device for error messages when failing to look up a protocol.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:20:23 -08:00
Johan Hovold a6e0363cb0 greybus: connection: fix potential null-deref in connection create
We allow connections without bundles so we must not use the bundle
device for error messages after binding the protocol.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:20:23 -08:00
Johan Hovold 21dcc9e503 greybus: connection: fix potential null-deref in hd_cport_enable
Use parent of host device for error messages as the connections bundle
may be NULL.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:20:23 -08:00
Johan Hovold e6c88bf31e greybus: connection: use bundle device for bundle error messages
It is safe to use the bundle device for error messages when we know we
have a bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-04 20:20:23 -08:00
Johan Hovold 53be091214 greybus: connection: remove unused time-stamp defines
Remove unused time-stamp defines, that were left in when the time-stamp
fifo was removed.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-02 11:26:44 -08:00
Greg Kroah-Hartman 30482c1e63 greybus: connection: use the bundle struct device instead of the connector
We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the connection code to use the bundle pointer instead
of the connection pointer for some error messages.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
2015-10-19 12:09:10 -07:00
Greg Kroah-Hartman b750fa3370 greybus: connection: remove 'struct device' from 'struct gb_connection'
We don't want this in the driver core, as nothing will be binding to it,
that's the job of a bundle.  So remove the struct device and use a kref
to handle reference counting instead.

Note, I don't think we really need a kref, but it keeps the lifetime the
same as before, and is the simplest change for now.  In the future it
might be easier to just attach all connections to the bundle and clean
them up when the bundle is removed.

Also remove the cport sysfs documentation as it's no longer relevant.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
2015-10-19 12:09:10 -07:00
Bryan O'Donoghue e7e2efc438 greybus: connection: add latency tag enable/disable callbacks
This patch adds a layered wrapper around optional latency tag
enable/disable commands to APBridge. When set APBridge and GPBridge will
insert timing information into reserved fields in the loopback response
header. Correspondingly when unset no timing information will be included
in the response payload.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-15 11:31:08 -07:00
Johan Hovold 7f0efa0679 greybus: connection: remove duplicate protocol lookup error message
Remove duplicate protocol lookup error message, which has already been
logged.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-14 12:10:38 -07:00
Johan Hovold 9942fc8b14 greybus: protocol: make protocol-lookup error message more informative
Make protocol lookup error more informative, by moving it to
gb_connection_bind_protocol and using dev_err.

Also make sure to use hex format for the protocol id as that is what is
used everywhere else.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-14 12:08:50 -07:00
Johan Hovold aae5a44ff5 greybus: connection: replace pr_err with dev_err
Replace a couple of pr_err with more informative dev_err and clean up
the messages somewhat.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-14 12:00:09 -07:00
Fabien Parent 67b81757da greybus: connection: destroy connection on failing to bind it
gb_connection_bind_protocol() returns proper error codes now and we
should destroy the connection on failures.

This change also fixes a NULL deref on hotplug when the control connection fails
to initialize.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-14 11:54:51 -07:00
Viresh Kumar 1575ef18ae greybus: svc: skip setting flags for boot over unipro
We need to skip setting E2EFC and other flags to the SVC connection
create request, for all cports, on an interface that need to boot over
unipro, i.e. interfaces required to download firmware.

This also adds a FIXME as we need to do it differently for ES3.

Tested-by: Eli Sennesh <esennesh@leaflabs.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off by: Eli Sennesh <esennesh@leaflabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-09 13:58:17 -07:00
Bryan O'Donoghue d090446a91 greybus: loopback: drop dependency on internal timestamps
This patch drops tracking of internal latencies, it's possible to derive
these times via kernel tracepoints and some user-space scripting. Since
there's no other use of the internal timestamp than the loopback driver we
remove the connection.c, connection.h, es1.c, es2.c and loopback.c
inter-dependency in one go.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-23 12:39:24 -07:00
Johan Hovold 3afe952127 greybus: hd: remove connection-create/destroy callbacks
These host-driver callbacks were intended to allow host drivers to
prepare a cport, something which can now be handled by the cport
enable/disable callbacks instead.

The current create/destroy are somewhat confusingly named as they were
not supposed to create or destroy connections. They were however called
from the unrelated helper functions that do create and destroy SVC
connections.

Furthermore, no errors were returned should the create callback fail,
which should have caused the connection initialisation to fail.

Remove these unused callbacks for now, and let us use the cport
enable/disable callbacks that should be able handle all host cport
initialisation (possibly after also adding an interface to provide
information for endpoint-cport mapping).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:35:47 -07:00
Johan Hovold d7ea30a571 greybus: hd: add optional cport enable and disable callbacks
Add optional cport enable and disable callbacks to the greybus host
drivers, that can be used to initialise and allocate/release resources
associated with a cport during connection setup/teardown (e.g. software
queues and hardware state).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:35:47 -07:00
Johan Hovold 2846d3ed2e greybus: connection: add protocol-version helper
Add protocol-version to improve readability.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:33:47 -07:00
Johan Hovold 9d7fc25b3c greybus: connection: add control-connected helper
Add control-connected helper to improve readability.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:33:47 -07:00
Johan Hovold 72d7482263 greybus: connection: clean up control-disconnected helper
Rename helper to the more descriptive
gb_connection_control_disconnected().

Use u16 for cport number, remove redundant cport number from warning
message, and shorten a long line.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:33:07 -07:00
Johan Hovold 8d7a712ca8 greybus: connection: clean up init error paths
Clearly mark error-path labels as such and clean up control flow.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:33:07 -07:00
Johan Hovold a95c258c6f greybus: connection: clean up svc-connection creation
Move SVC-connection creation to its own helper.

Note that the connection_create host-driver callback is really
unrelated to the SVC connection, and will be removed by a later patch.
It is is included for now as the connection_destroy callback is
currently made from the SVC-connection-destroy helper.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-17 14:33:07 -07:00
Viresh Kumar 8552ca0f36 greybus: connection: Add sysfs 'ap_cport_id' file for connections
Its a very useful piece of information, i.e. the cport id of the AP to
which the cport of the module is connected, and is required lots of
times. It isn't known in advance as it is allocated at runtime.

This patch creates another file 'ap_cport_id', only for the connection
directories, which will give the cport id of the AP.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14 21:29:01 -07:00
Viresh Kumar 5a5296bb8d greybus: Add flags to struct gb_protocol
This helps in removing special per-protocol code, with the help of
generic flags passed by protocol drivers.

Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14 21:19:46 -07:00
Viresh Kumar fb198317fd greybus: connection: Call connection_destroy() from gb_connection_svc_connection_destroy()
connection_create() is called right after svc is requested to create the
connection and so connection_destroy() must be called just before we
request the SVC to destroy the connection.

Over that, this fixes the inconsistency where connection_create() is
called for all connections except SVC connection, but
connection_destroy() is called always.

Acked-by: Alexandre Bailon <abailon@baylibre.com>
Fixes: 5313ca607afb ("Greybus driver: add a new callbacks to driver")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14 21:19:46 -07:00
Viresh Kumar 1b7a9cd5a5 greybus: connection: destroy svc connection on connection exit or errors
While initializing a connection, the AP requests the SVC to create a
connection between a cport on AP and a cport on the Module.

The opposite of that is missing, when connection is destroyed or if
errors occur after creating the connection. Fix it.

Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14 21:19:46 -07:00
Viresh Kumar a1163fae63 greybus: connection: call gb_svc_connection_create() from gb_connection_init()
There are two operations which very much work together:
- AP asks the SVC to create a connection between a cport of AP and a
  cport of module.
- AP tells the module that the connection is created.

Its better (logically) to do these two operations together and so call
gb_svc_connection_create() from gb_connection_init() instead. Also check
its return value properly.

Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14 21:19:46 -07:00
Alexandre Bailon 8afd831ea0 greybus: Greybus driver: add a new callbacks to driver
Add connection_create and connection_destroy callbacks.

ES2 can map a cport to a pair of endpoints.
Because ES2 have only a few pair of endpoints, ES2 need to have
access to some high level connection information such as protocol id
to effectively map the cports.
These callback will provide these information and help ES2 to map cports.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-04 14:49:09 -07:00