Commit Graph

9 Commits

Author SHA1 Message Date
Nathan Howard 59d409014a staging: greybus: arpc.h: remove duplicate line.
Fix checkpatch.pl issue of the form:
"CHECK: Please don't use multiple blank lines".

Signed-off-by: Nathan Howard <adanhawthorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12 13:26:14 +01:00
Johan Hovold 1b1732c4c4 greybus: es2: remove obsolete cport-reset ARPC
Remove the now obsolete and redundant cport-reset ARPC, along with the
consequently unused cport_disable callback.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-26 13:21:13 +02:00
Johan Hovold 77e52b3b0b greybus: es2: implement shutdown callback
Implement the shutdown callback which is used to execute shutdown
operations on offloaded connections.

This adds a new shutdown ARPC.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-26 13:21:13 +02:00
Johan Hovold d2dee94b66 greybus: es2: implement flush callback
Implement the flush callback which is called as part of connection tear
down to flush host-device queues and stop any ongoing transfers.

Note that this should be considered an optimisation of sort since if
the CPort is stuck waiting for credit, the CPort is likely still stuck
when we try to send the cport_shutdown request over it after the
callback returns.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-26 13:21:13 +02:00
Johan Hovold 6471c0039c greybus: hd/es2: add cport_clear callback and ARPC
Add a host-device cport_clear callback, which will be called as part
of the new connection tear-down sequence to reset the CPort state.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-11 14:13:07 +02:00
Johan Hovold 0e7cd0d259 greybus: hd/es2: add cport_quiesce callback and ARPC
Add a host-device cport_quiesce callback, which will be called as part
of the new connection tear-down sequence to disable flow control after
first making sure that enough peer buffer space is available for the
next messages about to be sent.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-11 14:13:07 +02:00
Johan Hovold a9dc1cf5b7 greybus: hd/es2: add cport_connected callback and ARPC
Add a host-device cport_connected callback, which will be called after a
connection has been created and that can be used by the host-device
driver to make sure its internal state is updated to match the CPort
attributes set by the SVC.

This callback will eventually replace the cport_features_enable
callback.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-11 14:13:07 +02:00
Greg Kroah-Hartman b3136a77a4 greybus: fix up copyright dates on arpc.h
I got them wrong, Johan was right, my fault.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-10 17:02:05 +02:00
Johan Hovold 7d0e76d6cb greybus: arpc: move arpc definitions to their own header
Move the ARPC definitions to their own header.

ARPC is not part of greybus, but is rather an implementation-specific
means of communicating with a certain class of host-device hardware.

Note that the same is true for the APBA USB vendor requests, but we keep
them in the greybus header for the time being.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-10 15:36:34 +02:00