1
0
Fork 0
Commit Graph

1607 Commits (d562853d3ecc31806412635adcc590b33621b0c0)

Author SHA1 Message Date
Greg Kroah-Hartman d562853d3e greybus: svc watchdog: allow it to be enabled/disabled from userspace
Sometimes you want to disable the SVC watchdog without having to patch
your kernel, so provide a sysfs file to do this.  This can let us do
power measurements, and let the firmware developers not go crazy
worrying that the kernel is going to reset their chips with no notice.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-26 17:06:29 -08:00
Greg Kroah-Hartman 7030f9246b greybus: camera: only build module against msm kernel
The camera driver currently does not build against anything other than
the msm kernel, due to cross-dependancies, so enable that here so that
we can build against other kernels without failing the build.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Tested-by: Marti Bolivar <mbolivar@leaflabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-26 09:52:20 -08:00
Greg Kroah-Hartman 839ac5b989 greybus: svc: double the ping delay timeout
Sometimes the ping response comes back _right_ after we timed out, as
the svc got its act together and squeaked out the ack, yet we miss it
and reset the whole bus.  Double the delay to hopefully give the svc a
little more of a chance to fix itself.  Odds are, it's still in trouble,
but we can just hold off resetting it for a bit more...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-26 09:52:20 -08:00
Vaibhav Hiremath d8b16338df greybus: arche-platform: Disable clock as part of driver remove
As part of driver remove (cleanup) function, disable the clock for both
SVC, APB1 & APB2.

Testing Done:
Tested on EVT1 platform with Connect=>disconnect=>connect
iteration, almost close to 100 iterations have passed (demo branch).
And also tested with kernel-only build.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-25 20:08:55 -08:00
Jacopo Mondi 4fbf69c71c greybus: camera: Stream config change unipro speed
Unipro network speed was increased at camera initialization time and
never slowed down.
This unnecessary drains power during the entire time camera module is
plugged in.
Increasing/decreasing unipro link speed before issuing stream
configuration request to camera module prevents this from happening.

Signed-off-by: Jacopo Mondi <jacopo.mondi@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-25 19:36:13 -08:00
Greg Kroah-Hartman 539d6e11d2 greybus: svc: return proper error code on watchdog create error
When the watchdog is not created properly, we need to propagate the
error for this and not just return success.

Reported-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-23 17:38:45 -08:00
Greg Kroah-Hartman ed7279ae31 greybus: svc: add a "watchdog" to check the network health
Now that we have a svc ping command, let's add a watchdog to call it
every so often (1 second at the moment.)  If it finds something went
wrong, post a stern message to the kernel log and call:
	start unipro_reset
to reset the whole greybus hardware subsystem.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-23 17:38:33 -08:00
Greg Kroah-Hartman 0f65fb1ea2 greybus: lsgb: Minor tweaks
Make it executable on an Android system
Change layout to be show heirachy a bit better.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-22 18:27:29 -08:00
Gjorgji Rosikopulos 7c154711a6 greybus: camera: add semiplanar and planar formats
This change adds missing planar and semiplanar
formats from gb specification.

Mbus to Gb format map:
V4L2_MBUS_FMT_NV12_1x8 -> 0x12
V4L2_MBUS_FMT_NV21_1x8 -> 0x13
V4L2_MBUS_FMT_YV12_1x8 -> 0x16
V4L2_MBUS_FMT_YU12_1x8 -> 0x17

Change depends on:
"media: add new mediabus format enums for ara camera"

Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-22 15:47:27 -08:00
Viresh Kumar f3e6c0971a greybus: svc: Expose and retain VID/PID received from bootrom for ES2
ES2 chips doesn't have efuses for storing module's vendor_id and
product_id and so we have hacked bootrom earlier using firmware
protocol, so that VID/PID can be received for fetching firmware
packages.

Another requirement is to expose them to sysfs, so that modules can be
identified properly.

That can be easily solved by updating interface's VID/PID, when fetched
using firmware protocol and later reusing them while the module switches
its identity from bootrom to firmware.

Do that only if the module is ES2 and the VID/PID sent during hotplug
are both 0.

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>
2016-01-22 15:24:58 -08:00
Greg Kroah-Hartman fd7c28ebf0 greybus: lsgb: add lsgb shell script
Horrid hack, but a start at making it easier for people to see what is
currently connected without having to deal with poking around in sysfs
directly.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-22 15:23:34 -08:00
Vaibhav Agarwal a547deb510 greybus: audio_codec: update codec_name as per driver->name
Originally, driver->name was not poluated from GB and thus
manually set from audio_codec driver as a hack.
This is no more required.
Another patch already removes that hack.

Now, with new driver->name as "legacy.<id-bundle.interface>"
codec is registered with different name.
So, during DAI link registration as well it needs modification.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 23:48:37 -08:00
Johan Hovold 8eff510961 greybus: firmware: abort if AP_READY fails
Abort if the AP_READY request fails.

Also update the comment suggesting that this operation was a temporary
one.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold e0deb079ed greybus: vibrator: convert to bundle driver
Convert the legacy vibrator protocol driver to a bundle driver.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 4324282d90 greybus: hid: convert to bundle driver
Convert the legacy HID protocol driver to a bundle driver.

This also fixes a potential crash should a (malicious) module have sent
an early request before the private data had been initialised.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 5dd8cc5370 greybus: hid: clean up init error paths
Separate success and error paths more clearly.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold f7ee081e31 greybus: connection: set request handlers at creation
Set the connection request handler at creation rather than when enabling
the connection.

This is possible now that connections are created by the drivers that
use them rather than by core at manifest parsing time.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 2399032d72 greybus: legacy: look up protocol at connection creation
Look up legacy protocol at connection create instead of at init.

Note that we can now look up the protocol before even creating the
actual connection. This is needed to be able to set a connection request
handler when creating the connection rather than when enabling it.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 63cf52f79b greybus: connection: remove legacy protocol id from core
Remove legacy protocol-id field that is only used by the legacy-protocol
driver from the connection structure.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 8278fae5d7 greybus: legacy: add initialized flag
Add initialized flag and use instead of the connection protocol pointer
to determine when the legacy connection has been initialised.

This is a step in moving legacy connection binding to
connection-creation time.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 431b3ebb3d greybus: legacy: refactor legacy-connection handling
Add wrapper structure for legacy connections and add helpers to create
and destroy legacy connections.

This is a step in removing legacy connection fields from the core
structures.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:46:38 -08:00
Johan Hovold 24e094d687 greybus: connection: return error-valued pointer on creation errors
Return an ERR_PTR on errors when creating connections.

This allows driver probe to fail with a more informative error message
as not all connection creation errors are due to memory exhaustion.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold 96c2af5c6b greybus: connection: rename connection-create interface
Drop the _dynamic suffix from the exported interface that drivers use to
create connections.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold 8cff6c6473 greybus: connection: simplify connection-creation interface
Simplify the exported generic interface for creating dynamic
connections.

Since all driver connections will have a bundle we can drop the
redundant interface parameter.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold e4c16f8b03 greybus: connection: drop the legacy protocol-id parameter
The protocol-id parameter is only used by the legacy driver so remove
it from the generic interface and move it to the legacy driver until it
can be removed completely.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold 59507e2612 greybus: connection: add helper to create control connections
Add dedicated helper to create control connections.

This will allow us to simplify the generic (dynamic) interface.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold bafe3f6790 greybus: connection: drop protocol parameter from static interface
Drop legacy protocol parameter from static connection interface.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold d6fba3dbb0 greybus: manifest: check for duplicate CPort descriptors when parsing
Now that connection creation has been separated from interface
initialisation, we should explicitly check for duplicate CPort
descriptors when parsing the manifest.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Johan Hovold 98fdf5a037 greybus: core: defer connection creation to driver probe
Defer connection creation to bundle driver probe instead of creating
them when initialising the interface and parsing the manifest.

Store copies of the CPorts descriptors in the bundle for the drivers to
use, and update the legacy driver.

This is needed for drivers that need more control over host-device
resource management, for example, when a protocol needs to use a
dedicated host CPort for traffic offloading (e.g. camera data).

This also avoids allocating host CPorts for bundles that are not bound
to a driver or for remote CPorts that a driver does not need.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:45:09 -08:00
Greg Kroah-Hartman 6ce4cc278d greybus: add bundle class to the bundle uevent
When bundles are added and then removed, we have a race where we go to
read the sysfs file, but it is now for a different bundle than the
uevent was originally for.  So add the bundle class to the uevent so we
"know" what the correct bundle class was.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:43:04 -08:00
Greg Kroah-Hartman 55ec09e898 greybus: svc: add ping command
This implements the SVC "ping" command.  It's tiny and simple, but we
need something like this in order for us to "know" if all is working
well.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 22:35:31 -08:00
Greg Kroah-Hartman eb8fafdfb9 greybus: firmware: log the name of the firmware being requested
People are getting confused as to what the firmware file name is for
their module, so log it to make it easier to find modules with "blank"
vid/pid values and let people know what to name their firmware files.

Because we are now logging this, turn the debug message after the
firmware request into an error message if something fails.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21 11:39:05 -08:00
Rui Miguel Silva ebe99d6181 greybus: svc: add key event handling
Add a new input device associated with the SVC to handle key events.
This new events are transfer over a new greybus svc operation which is
unidirectional.

It was selected the KEY_A for representing the KEY_ARA_BUTTON key code.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-20 18:03:00 -08:00
Greg Kroah-Hartman 4b87413428 greybus: audio_codec: Don't be tricky with the driver model
With the recent changes by Johan to the driver model of the greybus
code, the audio_codec no longer should need to provide a "dummy" driver
when registering the codec.  In fact, having it there causes the greybus
core to crash when inserting the module.  Removing it all fixes the
crash.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-20 16:35:24 -08:00
Johan Hovold 7d81bafa4c greybus: legacy: add private driver data
Allocate private data structure at probe and release at disconnect.

The private data will be used to track the connections managed by the
driver, but for now only holds a count of the number of cports the
bundle has.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold b53e0c9e8d greybus: connection: make cport lookup thread-safe
Use the gb_connection_mutex when making sure a remote CPort is
available.

This is needed when moving to driver-managed connections that can be
created and destroyed at any time.

Also check for duplicate bundle-less connections.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 210b508e45 greybus: connection: serialise connection creation
Serialise connection creation against concurrent creation and
destruction using a global mutex.

This is needed to prevent two drivers from attempting to create a
connection to the same interface CPort and to cope with a racing
connection destroy when moving to driver managed connections.

Note that the locking can not (easily) be made more fine-grained as not
all connections have an interface, but these are not hot paths anyway.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 0e46fab7dd greybus: connection: fix lookup race
Fix longstanding race that could lead to a connection being destroyed
while processing an incoming message due to missing reference counting
when looking up the connection.

Add helpers to manipulate the connection kref.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold c6d64a19cd greybus: connection: drop the connection_mutex
Drop the useless connection_mutex that did not, and can not be used to
prevent connection lookup races in atomic context and therefore serves
no purpose.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold c3681f6c92 greybus: connection: destroy workqueue at unregister
Destroy the work queue when the connection is destroyed/deregistered
instead of when the last reference is dropped.

The work queue is not needed once the connection has been deregistered,
and no operations will ever be added to it again (handled by checking
connection->state) even if the connection object may not be deallocated
until the final reference is dropped.

The work-queue name is set based on the host-device name and host-device
cport id, something which guarantees a unique name. This would no longer
be true if the work queue was not destroyed at connection deregistration
as a new connection could then be created for that very same host cport.

This is not necessarily a problem unless some work queue features are
used that require unique work-queue names, but let's try to be well
behaved.

Also update an obsolete comment and make explicit that a connection must
be disabled before being destroyed.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 2edbf5ffbf greybus: connection: remove WARN_ON from destroy
Remove WARN_ON from connection destroy testing for a NULL-connection
when destroying a connection.

This will allow for simpler driver code when releasing driver-managed
connections.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold b807aa7aa5 greybus: control: add bundle-version operation
Add bundle-version operation to fetch the version of the bundle class.

Retrieve the bundle version of all bundles when initialising the
interface in case the control-protocol version is greater than 0.1.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 96a9b9b0eb greybus: connection: remove broken protocol-version handling
Remove the broken legacy protocol-version handling from core and move it
to the legacy driver instead.

Note that version handling has always been broken as legacy protocols
were looked up and bound to connections before the connections were
enabled and version negotiation could take place (over that very
connection). Document that in the legacy driver as well.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 357de00657 greybus: svc: store protocol version
Store the "negotiated" protocol version to use in the svc state
struct instead of the connection struct.

The generic concept of a connection version is going away in favour of
bundle-class versions.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 47a2e6769e greybus: core: disable bundle connections on hot-unplug
Disable bundle connections in core before calling driver disconnect in
case the interface is already gone.

This avoids unnecessary timeouts on hot-unplug when a driver does I/O in
its disconnect callback.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 01547770e6 greybus: legacy: use protocol pointer to determine state
Use the protocol pointer to determine the legacy connection state.

This is needed to allow core disable connections when an interface has
been hot-unplugged without the legacy protocols leaking its resources.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 50dfb87865 greybus: connection: move legacy-protocol handling to legacy driver
Move legacy protocol and connection handling to the legacy driver.

Rename the former global functions using a common legacy_ prefix.

Note that all legacy protocols suffer from a connection initialisation
race in that the protocol-specific initialisation, which includes
allocation of protocol-specific state containers, can not happen until
*after* the connection has been enabled. This is a major flaw in the
original design that we can now finally address by converting the legacy
protocol drivers into proper bundle (class) drivers.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 84427943d2 greybus: svc: drop legacy-protocol dependency
Drop dependency on the legacy protocol abstraction.

Remove the now unused and last legacy-protocol flag
GB_PROTOCOL_SKIP_VERSION along with the protocol-flag feature.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold e217ae762b greybus: control: drop legacy-protocol dependency
Drop dependency on the legacy protocol abstraction.

Instead implement the protocol-specific version request directly, and
use the new interface for managing the control connection.

Note that the version request is being removed from most protocols, but
we need to keep the current request for the control protocol as-is
indefinitely to maintain backwards compatibility (e.g. with the ES2/ES3
bootrom).

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00
Johan Hovold 6bd6e14893 greybus: greybus_protocols: remove control-protocol version
Remove control-protocol version from the exported protocol definitions
as it is an implementation detail that makes no sense to export.

Currently gbsim uses the kernel's control-protocol version definitions
directly instead of reporting the version of the protocol it actually
implements.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-19 12:17:13 -08:00