Commit graph

7 commits

Author SHA1 Message Date
Alex Elder e9385e5d5a greybus: include "gpbridge.h" from "greybus.h"
Avoid the need for all the source files to include "gpbridge.h"
by just having "greybus.h" include it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-23 16:34:39 -07:00
Viresh Kumar bdac599c70 greybus: Use gb_gpbridge_protocol_init()
Start using gb_gpbridge_protocol_init() in gpbridge drivers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-20 22:44:37 -07:00
Viresh Kumar 4890f31966 greybus: spi: Move structure definitions into gpbridge.h
In order to facilitate re-use of spi structures, split them out of
independent files and add them into a shared gpbridge.h

This will be a prereq to sharing these headers w/ gbsim.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-20 22:36:03 -07:00
Alex Elder 6d653370c0 greybus: eliminate extra response flag definitions
All protocols use the same value to distinguish between request and
response message types.  This is a requirement.

Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE
for the name of the flag used to distiguish between request and
response messages.

Get rid of the redundant response flag definitions that are
associated with specific protocols.

Describe the symbolic values as "operation types" rather than
"message types" where they are defined.  The message type for a
request is the same as the operation type; the message type for a
response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-07 22:57:31 +02:00
Johan Hovold 25eb732954 greybus: connection: replace custom error function with dev_err
Remove custom connection error function and replace it with dev_err.

The standard error function provides more information in the message
prefix (e.g. includes the interface id), has a well-known semantics
(e.g. does does not add newlines to messages), and is even somewhat
shorter to type.

Note that some uses of the custom function were already adding double
newlines due to the non-standard semantics.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-03-19 17:28:19 +01:00
Viresh Kumar f4e6c817b3 greybus: spi:fix sparse warnings
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-01-27 14:50:23 -08:00
Viresh Kumar 15d651b0db greybus: spi: add bridged-PHY spi protocol driver
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-01-23 22:58:02 +08:00